Skip to content

Debug

Debug #8

Workflow file for this run

name: Main CI
on:
push:
branches: [ deployment ]
# branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Copy files to prod server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
source: "."
target: ${{ secrets.PATH }}
- name: Restart
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
envs: NODE_ENV,CALENDAR_ID,EARNINGS_HEADSUP_DAYS,GCP_CLIENT_EMAIL,GCP_PRIVATE_KEY
script: |
source ~/.profile
cd ${{ secrets.PATH }}
rm -rf .git
pnpm i
pnpm run prod:stop
NODE_ENV=${{ secrets.NODE_ENV }} CALENDAR_ID=${{ secrets.CALENDAR_ID }} EARNINGS_HEADSUP_DAYS=${{ secrets.EARNINGS_HEADSUP_DAYS }} GCP_CLIENT_EMAIL=${{ secrets.GCP_CLIENT_EMAIL }} GCP_PRIVATE_KEY=${{ secrets.GCP_PRIVATE_KEY }} pnpm run prod:start