embroidery-viewer/.github/workflows/deploy.yml

28 lines
771 B
YAML
Raw Permalink Normal View History

2022-11-27 19:42:21 +00:00
name: Deploy
on:
push:
2022-11-27 20:00:35 +00:00
branches: ["main"]
2022-11-27 19:42:21 +00:00
jobs:
build-and-deploy:
runs-on: ubuntu-latest
env:
SSH_KEY: ${{secrets.SSH_KEY}}
steps:
2022-11-27 20:00:35 +00:00
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
- run: npm install
- run: npm run build
- run: mkdir ~/.ssh
- run: echo "$SSH_KEY" >> ~/.ssh/id_rsa_embroideryviewer
- run: chmod 400 ~/.ssh/id_rsa_embroideryviewer
- run: echo -e "Host embroideryviewer\n\tUser embroideryviewer\n\tHostname 45.76.5.44\n\tIdentityFile ~/.ssh/id_rsa_embroideryviewer\n\tStrictHostKeyChecking No" >> ~/.ssh/config
2022-11-27 20:04:34 +00:00
- run: rsync -avz --progress dist/ embroideryviewer:web/prod