Production Deployment #2
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: Production Deployment | |
on: | |
workflow_run: | |
workflows: ["Run tests"] | |
types: | |
- completed | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
# Deploy only when the "Run tests" workflow succeeded | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
strategy: | |
matrix: | |
node-version: [20.x] | |
name: Node ${{ matrix.node-version }} | |
steps: | |
- name: Running deployment script on server | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SUPERCHARGE_DEPLOY_SSH_HOST }} | |
username: ${{ secrets.SUPERCHARGE_DEPLOY_SSH_USER }} | |
port: ${{ secrets.SUPERCHARGE_DEPLOY_SSH_PORT }} | |
key: ${{ secrets.SUPERCHARGE_DEPLOY_SSH_PRIVATE_KEY }} | |
script: /home/launch/scripts/deploy-superchargejs.com.sh |