Deploy: niente artifact v4, SCP dist dopo build CI
All checks were successful
Deploy to VPS / deploy (push) Successful in 44s
All checks were successful
Deploy to VPS / deploy (push) Successful in 44s
This commit is contained in:
parent
a2ffd71452
commit
662eb46067
1 changed files with 6 additions and 20 deletions
26
.github/workflows/deploy.yml
vendored
26
.github/workflows/deploy.yml
vendored
|
|
@ -7,34 +7,20 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
- uses: https://github.com/actions/checkout@v4
|
- uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
- uses: https://github.com/actions/setup-node@v4
|
- uses: https://github.com/actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "20"
|
node-version: "20"
|
||||||
- run: npm ci --prefer-offline
|
|
||||||
- run: npm run build
|
- name: Build frontend
|
||||||
|
run: npm ci --prefer-offline && npm run build
|
||||||
env:
|
env:
|
||||||
VITE_API_URL: https://esameits24-26backend.andreavillari.it
|
VITE_API_URL: https://esameits24-26backend.andreavillari.it
|
||||||
- uses: https://github.com/actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: frontend-dist
|
|
||||||
path: dist/
|
|
||||||
retention-days: 1
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
needs: build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 15
|
|
||||||
steps:
|
|
||||||
- uses: https://github.com/actions/checkout@v4
|
|
||||||
|
|
||||||
- uses: https://github.com/actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: frontend-dist
|
|
||||||
path: dist
|
|
||||||
|
|
||||||
- uses: https://github.com/appleboy/scp-action@v0.1.7
|
- uses: https://github.com/appleboy/scp-action@v0.1.7
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue