Created
September 7, 2020 18:13
-
-
Save vburlak/919b7d1e64d9e6fc997819c299bff512 to your computer and use it in GitHub Desktop.
Roots Trellis deploy Github Action workflow example with Ansible 2.8 and Trellis Slack Webhook Notify
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: Continuous Deployment | |
on: | |
push: | |
branches: | |
- staging | |
- master | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup ssh-agent | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
ssh-auth-sock: ${{ github.workspace }}/ssh-auth.sock | |
# Setup GH credentials for upcoming https://github.com/ItinerisLtd/trellis-slack-webhook-notify-during-deploy/pull/7 updates | |
- name: Setup Git Credentials | |
uses: oleksiyrudenko/gha-git-credentials@master | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Deploy Staging | |
if: github.ref == 'refs/heads/staging' | |
uses: steenbergen-design/[email protected] | |
with: | |
vault_password: ${{ secrets.VAULT_PASS }} | |
site_env: staging | |
site_name: example.com | |
- name: Deploy Production | |
if: github.ref == 'refs/heads/master' | |
uses: steenbergen-design/[email protected] | |
with: | |
vault_password: ${{ secrets.VAULT_PASS }} | |
site_env: production | |
site_name: example.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment