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 name: Deploy
on: on:
@ -7,7 +7,7 @@ on:
workflow_dispatch: workflow_dispatch:
jobs: jobs:
build: build-and-deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
defaults: defaults:
run: run:
@ -17,24 +17,18 @@ jobs:
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 20 node-version: 20
- run: npm ci - name: Install dependencies
- run: npm run build run: npm ci
- name: Upload artifact - name: Build site
uses: actions/upload-artifact@v4 run: npm run build
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: Deploy to Forgejo Pages - name: Deploy to Forgejo Pages
run: | run: |
echo "Deploy site/.vitepress/dist to your web server" cd .vitepress/dist
echo "See: http://185.239.209.216:3001/artale/agentic-engineering-course" 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