Files
timelapse-calc/.gitea/workflows/deploy.yml
Tien Ngo f7313c5143
Some checks failed
Deploy to Private Server / build (push) Successful in 28s
Deploy to Private Server / deploy (push) Failing after 3s
commit
2025-12-24 16:21:03 +07:00

63 lines
1.3 KiB
YAML

name: Deploy to Private Server
on:
push:
branches: [ "main" ]
env:
BASH_ENV: ~/.profile
jobs:
build:
runs-on: ubuntu-latest
container:
image: node:20-slim
steps:
- uses: actions/checkout@v4
- name: Build Vite app
run: |
npm ci
npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build-output
path: dist/
deploy:
runs-on: homesrv
needs: build
steps:
- name: Debug PATH
run: |
whoami
echo $SHELL
echo $PATH
which node || true
- name: Load NVM and Node
shell: bash
run: |
export NVM_DIR="/root/.nvm"
source "$NVM_DIR/nvm.sh"
node -v
- uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: build-output
path: dist/
- name: Deploy to host
run: |
rm -rf /www/vite-app/timelapse-calc
mkdir -p /www/vite-app/timelapse-calc
cp -r dist/* /www/vite-app/timelapse-calc/
echo "Deployment completed successfully"
echo "Deployed files:"
ls -la /www/vite-app/timelapse-calc/