Giter VIP home page Giter VIP logo

action-platformsh-deploy-status's Introduction

action-platformsh-deploy-status

If anything goes wrong when deploying (NOT building) a PlatformSH project, the deployer does not fail. This is an issue, as it can give you the idea that Drupal config has applied successfully (or a whole host of other issues)

The deploy-status file

This simple GitHub Action workflow checks if a deploy-status file exists on the PR environment. This file is generated, by adding the following to your .platform.app.yaml:

  # We run deploy hook after your application has been deployed and started.
  # We use set -e to cause a total fail if something goes wrong.
  # Otherwise, a deploy-status file will instead be populated with 1.
  # You can use a Github action to check if there was any issues with deploy.
  # This is necessary, as PlatformSH just fails silently, such as when
  # the Drupal config is invalid.
  deploy: |
    STATUS_FILE="$PLATFORM_DOCUMENT_ROOT/sites/default/files/deploy-status"
    rm -f "$STATUS_FILE"
    echo "0" > "$STATUS_FILE"
    set -e
    [ .. DOING YOUR OWN DEPLOY CHANGES, SUCH AS DRUSH DEPLOY .. ]
    echo "1" > "$STATUS_FILE"

In this example, we're putting the file in /sites/default/files/ as it's a Drupal site.

The files folder is the only folder that is writable during build.

Getting the ready URL

This action relies on another action, for getting the environment URL.

https://github.com/rasben/action-platformsh-url

Most of the inputs here, are needed for that action.

action-platformsh-deploy-status's People

Contributors

rasben avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.