Debug #5
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: 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 | |
echo "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 }}" > test.env | |
# 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 |