commit 8a49711

Artur Manuel  ·  2026-05-21 01:19:16 +0000 UTC
parent a47cefa
ci: add CI to deploy our pages to codeberg (for real this time)
2 files changed,  +40, -0
+38, -0
 1@@ -0,0 +1,38 @@
 2+name: Deploy to Codeberg Pages
 3+on:
 4+  push:
 5+    branches:
 6+      - main
 7+jobs:
 8+  build-ssg:
 9+    runs-on: codeberg-medium-lazy
10+    name: "Build the SSG"
11+    steps:
12+      - name: Checkout
13+        uses: https://data.forgejo.org/actions/checkout@v6
14+      - name: Setup Go
15+        uses: https://github.com/actions/setup-go
16+      - name: Build SSG
17+        run: make
18+  build-pages:
19+    needs:
20+      - build-ssg
21+    runs-on: codeberg-small-lazy
22+    name: "Build the pages with our SSG"
23+    steps:
24+      - name: Build pages
25+        run: ./generate_pages
26+      - name: Setup bare repository
27+        run: |
28+          cd output
29+          git init
30+          git remote add origin "$FORGEJO_SERVER_URL/$FORGEJO_REPOSITORY"
31+          git switch -c pages
32+          git add .
33+          git commit -m "redeploy pages $FORGEJO_RUN_ID"
34+          git push
35+  deploy:
36+    needs:
37+      - build-pages
38+    runs-on: codeberg-tiny-lazy
39+    name: "Deploy pages to Codeberg Pages"
+2, -0
1@@ -18,3 +18,5 @@
2 !/LICENSE
3 !/go.sum
4 !/go.mod
5+!/.forgejo
6+!/.forgejo/**