Update workflow
This commit is contained in:
parent
62ab12ed20
commit
bba1449aa9
2 changed files with 15 additions and 16 deletions
29
.github/workflows/deploy.yml
vendored
29
.github/workflows/deploy.yml
vendored
|
@ -2,27 +2,26 @@ name: Deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: ["main"]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
env:
|
env:
|
||||||
SSH_KEY: ${{secrets.SSH_KEY}}
|
SSH_KEY: ${{secrets.SSH_KEY}}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Use Node.js 16
|
- name: Use Node.js 16
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 16
|
||||||
cache: 'npm'
|
cache: "npm"
|
||||||
- run: npm install
|
- run: npm install
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
- run: mkdir ~/.ssh
|
- run: mkdir ~/.ssh
|
||||||
- run: echo "$SSH_KEY" >> ~/.ssh/id_ed25519_embroideryviewer
|
- run: echo "$SSH_KEY" >> ~/.ssh/id_rsa_embroideryviewer
|
||||||
- run: chmod 400 ~/.ssh/id_ed25519_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_ed25519_embroideryviewer\n\tStrictHostKeyChecking No" >> ~/.ssh/config
|
- 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
|
||||||
- run: rsync -avz --progress dist/ embroideryviewer:embroideryviewer/web/prod
|
- run: rsync -avz --progress dist/ embroideryviewer:embroideryviewer/web/prod
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "embroidery-viewer",
|
"name": "embroidery-viewer",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.1.0",
|
"version": "1.0.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|
Loading…
Reference in a new issue