Skip to content

Commit f9eefcb

Browse files
ci: deploy docs via Ddraig SSG (#65)
Mass rollout for Ddraig SSG
1 parent 190d9f6 commit f9eefcb

1 file changed

Lines changed: 23 additions & 24 deletions

File tree

.github/workflows/pages.yml

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# SPDX-License-Identifier: MPL-2.0
2-
name: GitHub Pages
1+
name: GitHub Pages (Ddraig SSG)
32
on:
43
push:
5-
branches: [main]
4+
branches: [main, master]
65
workflow_dispatch:
76
permissions:
87
contents: read
@@ -15,30 +14,30 @@ jobs:
1514
build:
1615
runs-on: ubuntu-latest
1716
timeout-minutes: 15
17+
container:
18+
image: ghcr.io/stefan-hoeck/idris2-pack@sha256:f0758996a931fb35d9ecb1de273c4d59dabe2a09b433afc7e357f65a08b7e1ff
1819
steps:
19-
- name: Checkout
20-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4
21-
- name: Setup GHCup
22-
uses: haskell-actions/setup@cd0d9bdd65b20557f41bea4dbe43d0b5fbbfe553 # v2
20+
- name: Checkout Site
21+
uses: actions/checkout@v4
22+
- name: Checkout Ddraig SSG
23+
uses: actions/checkout@v4
2324
with:
24-
ghc-version: '9.8.2'
25-
cabal-version: '3.10'
26-
- name: Cache Cabal
27-
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v4
28-
with:
29-
path: |
30-
~/.cabal/packages
31-
~/.cabal/store
32-
dist-newstyle
33-
key: ${{ runner.os }}-cabal-${{ hashFiles('casket-ssg.cabal') }}
34-
- name: Build casket-ssg
35-
run: cabal build
25+
repository: hyperpolymath/ddraig-ssg
26+
path: .ddraig-ssg
27+
- name: Compile Ddraig
28+
working-directory: .ddraig-ssg
29+
run: idris2 Ddraig.idr -o ddraig
3630
- name: Build site
37-
run: cabal run casket-ssg -- build site _site
38-
- name: Setup Pages
39-
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
31+
run: |
32+
mkdir -p src
33+
if [ ! -f src/index.md ] && [ -f README.md ]; then
34+
cp README.md src/index.md
35+
elif [ ! -f src/index.md ]; then
36+
echo "# ${GITHUB_REPOSITORY}" > src/index.md
37+
fi
38+
./.ddraig-ssg/build/exec/ddraig build src _site https://hyperpolymath.github.io/${GITHUB_REPOSITORY#*/}
4039
- name: Upload artifact
41-
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v3
40+
uses: actions/upload-pages-artifact@v3
4241
with:
4342
path: '_site'
4443
deploy:
@@ -51,4 +50,4 @@ jobs:
5150
steps:
5251
- name: Deploy to GitHub Pages
5352
id: deployment
54-
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
53+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)