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