...
Code Block |
---|
name: Create Pantheon Multidev for Pull Request
on:
pull_request:
types: [opened]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.PANTHEON_SSH_KEY }}
config: ${{ secrets.SSH_CONFIG }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- name: Installing Terminus
env:
pantheon_machine_token: ${{ secrets.PANTHEON_MACHINE_TOKEN }}
run: |
composer global require pantheon-systems/terminus
~/.composer/vendor/bin/terminus auth:login --machine-token=$pantheon_machine_token
- name: deployer
env:
pantheon_repo: '${{ secrets.PANTHEON_REPO }}'
pantheon_site_name: '${{ secrets.PANTHEON_SITE_NAME }}'
run: |
BRANCH_NAME=$(echo ${GITHUB_HEAD_REF})
BASE_BRANCH=${GITHUB_REF##*/}
git remote add pantheon $pantheon_repo
git push -uf pantheon HEAD:$BRANCH_NAME
~/.composer/vendor/bin/terminus multidev:create $pantheon_site_name.dev $BRANCH_NAME |
...