Skip to content

Instantly share code, notes, and snippets.

@ygerasimov
Last active February 26, 2024 15:13
Show Gist options
  • Save ygerasimov/0dd4bd906829ebf795df70048f9aae28 to your computer and use it in GitHub Desktop.
Save ygerasimov/0dd4bd906829ebf795df70048f9aae28 to your computer and use it in GitHub Desktop.
pull-request-production.yml
name: Trigger deployment to Test on pull request to Production branch.
on:
pull_request:
branches:
- production
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install Terminus
uses: pantheon-systems/terminus-github-actions@main
with:
pantheon-machine-token: ${{ secrets.PANTHEON_MACHINE_TOKEN }}
- name: deployer
env:
pantheon_repo: '${{ secrets.PANTHEON_REPO }}'
pantheon_site_name: '${{ secrets.PANTHEON_SITE_NAME }}'
run: |
terminus env:deploy $pantheon_site_name.test --note="Test deployment: ${{ github.event.pull_request.title }}"
terminus env:clone-content --cc --updatedb $pantheon_site_name.live test --yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment