45 lines
913 B
YAML
45 lines
913 B
YAML
name: Deploy to Private Server
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
|
|
jobs:
|
|
vite-build:
|
|
runs-on: node-20
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build Vite app
|
|
working-directory: ./src
|
|
run: |
|
|
npm ci
|
|
npm run build
|
|
|
|
- name: Upload Vite artifacts
|
|
uses: actions/upload-artifact@v4
|
|
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@v4
|
|
with:
|
|
name: vite-dist
|
|
path: dist
|
|
|
|
- name: Deploy to Private Server
|
|
run: |
|
|
rm -rf /deploy/vite-app/timelapse-calc
|
|
cp -r dist/* /deploy/vite-app/timelapse-calc/
|
|
rm -rf dist
|
|
|
|
echo "Deployment completed successfully" |