fix deploy
This commit is contained in:
@@ -5,7 +5,7 @@ on:
|
|||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: node:20-slim
|
image: node:20-slim
|
||||||
@@ -18,10 +18,30 @@ jobs:
|
|||||||
npm ci
|
npm ci
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
- name: Deploy
|
- name: Upload build artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: dist-files
|
||||||
|
path: dist/
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Download build artifacts
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: dist-files
|
||||||
|
path: dist/
|
||||||
|
|
||||||
|
- name: Deploy to host
|
||||||
run: |
|
run: |
|
||||||
rm -rf /deploy/vite-app/timelapse-calc
|
rm -rf /deploy/vite-app/timelapse-calc
|
||||||
mkdir -p /deploy/vite-app/timelapse-calc
|
mkdir -p /deploy/vite-app/timelapse-calc
|
||||||
cp -r dist/* /deploy/vite-app/timelapse-calc/
|
cp -r dist/* /deploy/vite-app/timelapse-calc/
|
||||||
|
echo "Deployment completed successfully"
|
||||||
echo "Deployment completed successfully"
|
echo "Deployed files:"
|
||||||
|
ls -la /deploy/vite-app/timelapse-calc/
|
||||||
Reference in New Issue
Block a user