access: dev-d8-2277 d433ba7 => dev-d8-2277 c7667d9 #3524
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: (A) Deploy to dev | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'md-*' | |
jobs: | |
deploy: | |
name: Deploy site | |
runs-on: ubuntu-latest | |
if: ${{ !contains(github.event.head_commit.message, '#nobuild') }} | |
steps: | |
- uses: actions/[email protected] | |
- uses: ./.github/actions/dingorunner | |
env: | |
runner: update | |
blt: ./vendor/bin/blt | |
SSH_PRIVATE_KEY: ${{ secrets.PANTHEON_DEPLOY_KEY}} | |
message: ${{ github.event.head_commit.message }} | |
gh_token: ${{ secrets.GH_TOKEN_REPO }} | |
- name: Trigger Behat workflow | |
if: "contains(github.event.head_commit.message, '#behat')" | |
run: | | |
gh workflow run behat.yml -r "$drupal_update" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_REPO }} | |
drupal_update: ${{ github.event.inputs.drupal_update }} | |
md: | |
name: Spin up Multidev environment | |
runs-on: ubuntu-latest | |
if: ${{ contains(github.ref, 'md-') }} | |
needs: deploy | |
steps: | |
- uses: actions/[email protected] | |
- name: Composer install | |
run: | | |
composer install --no-dev --ignore-platform-reqs | |
- name: Check if multidev environment exists | |
uses: ./.github/actions/dingorunner | |
env: | |
runner: md_check | |
terminus_api: ${{ secrets.TERMINUS_API }} | |
SSH_PRIVATE_KEY: ${{ secrets.PANTHEON_DEPLOY_KEY}} | |
- name: Store md file status | |
run: | | |
branch="${GITHUB_REF#refs/heads/}" | |
filename="blt/md/$branch" | |
file_exists=false | |
if [ -f "$filename" ]; then | |
file_exists=true | |
fi | |
echo $file_exists | |
echo "MD_FILE=$(echo $file_exists)" >> $GITHUB_ENV | |
- name: Store md status into env variable | |
run: | | |
MD_STATUS=$(cat md_check.txt) | |
echo $MD_STATUS | |
echo "md=$(echo $MD_STATUS)" >> $GITHUB_ENV | |
- name: Create multidev environment | |
uses: ./.github/actions/dingorunner | |
if: ${{ env.md == 'false' }} | |
env: | |
runner: md_create | |
terminus_api: ${{ secrets.TERMINUS_API }} | |
SSH_PRIVATE_KEY: ${{ secrets.PANTHEON_DEPLOY_KEY}} | |
- name: Store run file commands | |
uses: ./.github/actions/dingorunner | |
if: ${{ env.MD_FILE == 'true' }} | |
env: | |
runner: md_file_commands | |
terminus_api: ${{ secrets.TERMINUS_API }} | |
SSH_PRIVATE_KEY: ${{ secrets.PANTHEON_DEPLOY_KEY}} |