fix: update deploy.yml for Forgejo Actions

This commit is contained in:
artale 2026-06-03 15:44:30 +02:00
parent c7236e0c32
commit dd01c0e25a
1 changed files with 15 additions and 21 deletions

View File

@ -1,4 +1,4 @@
# Deploy VitePress site to Forgejo Pages
# Deploy VitePress site via Forgejo Actions
name: Deploy
on:
@ -7,7 +7,7 @@ on:
workflow_dispatch:
jobs:
build:
build-and-deploy:
runs-on: ubuntu-latest
defaults:
run:
@ -17,24 +17,18 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: site-dist
path: site/.vitepress/dist
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: site-dist
path: dist
- name: Install dependencies
run: npm ci
- name: Build site
run: npm run build
- name: Deploy to Forgejo Pages
run: |
echo "Deploy site/.vitepress/dist to your web server"
echo "See: http://185.239.209.216:3001/artale/agentic-engineering-course"
cd .vitepress/dist
git init
git checkout -b pages
git add -A
git config user.name "artale"
git config user.email "arosstale1@gmail.com"
git commit -m "deploy: $(date -u +%Y-%m-%dT%H:%M:%SZ)"
git remote add deploy http://artale:${{ secrets.FORGEJO_TOKEN }}@185.239.209.216:3001/artale/agentic-ai-engineering.git
git push -f deploy pages