Files
hoelee-blog/.gitea/workflows/deploy.yml
T
hoelee 36acce550e
Deploy / build (push) Successful in 16s
deploy: use PAT secret, full pipeline
2026-09-06 05:02:37 +08:00

29 lines
735 B
YAML

name: Deploy
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
run: |
git config --global --add safe.directory '*'
git clone --depth 1 "https://hoelee:${{ secrets.PAT }}@git.hoelee.com/hoelee/hoelee-blog.git" .
git checkout $GITHUB_SHA 2>/dev/null || true
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Deploy to nginx-hoelee-blog
run: |
rm -rf /mnt/user/docker/nginx-hoelee-blog/html/*
cp -r dist/* /mnt/user/docker/nginx-hoelee-blog/html/
echo "Deployed. Contents:"
ls -la /mnt/user/docker/nginx-hoelee-blog/html/