Fix block handler config #6
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
# Uncomment this deploy job in this file to use the | |
# https://github.com/roots/setup-trellis-cli GitHub Action | |
# for deploying this repo to production when pushing to main. | |
# | |
# Make sure you've set up the following secrets in your repo: | |
# - TRELLIS_DEPLOY_SSH_PRIVATE_KEY | |
# - TRELLIS_DEPLOY_SSH_KNOWN_HOSTS | |
# - ANSIBLE_VAULT_PASSWORD | |
name: Build and Deploy | |
on: | |
push: | |
branches: [ main, develop ] | |
env: | |
NODE_VERSION: 18 | |
ENVIRONMENT: ${{ ( github.ref_name == 'main' ) && 'production' || 'staging' }} | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: yarn | |
cache-dependency-path: yarn.lock | |
- uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.TRELLIS_DEPLOY_SSH_PRIVATE_KEY }} | |
known_hosts: ${{ secrets.TRELLIS_DEPLOY_SSH_KNOWN_HOSTS }} | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.TRELLIS_DEPLOY_SSH_PRIVATE_KEY }} | |
- uses: roots/setup-trellis-cli@main | |
with: | |
ansible-vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} | |
- name: Deploy | |
run: cd trellis & trellis deploy ${{ env.ENVIRONMENT }} |