diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5d0dc00..8917685 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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