2022-09-22 12:55:05 +00:00
|
|
|
name: Deploy to Production
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "main" ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-and-deploy:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
env:
|
|
|
|
SSH_KEY: ${{secrets.SSH_KEY}}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Use Node.js 16
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
cache: 'npm'
|
2022-09-22 13:48:46 +00:00
|
|
|
- run: npm install
|
2022-09-22 19:08:16 +00:00
|
|
|
- run: npm run build:prod
|
2022-11-01 14:41:53 +00:00
|
|
|
- run: sh ${GITHUB_WORKSPACE}/scripts/deploy.sh $SSH_KEY prod
|