Last active
February 26, 2024 15:14
-
-
Save ygerasimov/70a919b5155f5518700feb75ffa9976e to your computer and use it in GitHub Desktop.
deploy-production.yml
This file contains hidden or 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: Deploy to prod after merge to production branch | |
on: | |
push: | |
branches: | |
- production | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.PANTHEON_SSH_KEY }} | |
config: ${{ secrets.SSH_CONFIG }} | |
known_hosts: ${{ secrets.KNOWN_HOSTS }} | |
- name: Install Terminus | |
uses: pantheon-systems/terminus-github-actions@main | |
with: | |
pantheon-machine-token: ${{ secrets.PANTHEON_MACHINE_TOKEN }} | |
- name: deployer | |
env: | |
pantheon_site_name: '${{ secrets.PANTHEON_SITE_NAME }}' | |
run: | | |
commit_message=$(git log -1 --pretty=%B) | |
terminus env:deploy $pantheon_site_name.live --note="Prod deployment: $commit_message" | |
terminus env:clear-cache $pantheon_site_name.live |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment