Skip to content

Commit d421a24

Browse files
committed
New website template
1 parent 8ab886e commit d421a24

13 files changed

Lines changed: 1064 additions & 437 deletions

File tree

.github/workflows/website.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Build GitHub Pages from md files
2+
on:
3+
push:
4+
paths:
5+
- '*.md'
6+
- 'docs/*.css'
7+
- 'docs/*.js'
8+
- .github/workflows/website.yml
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: true
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
outputs:
24+
docs_changed: ${{ steps.diff.outputs.changed }}
25+
steps:
26+
- name: 🛎️ Checkout
27+
uses: actions/checkout@v6
28+
with:
29+
fetch-depth: 2
30+
31+
- name: Setup Pages
32+
uses: actions/configure-pages@v4
33+
34+
- name: Install Pandoc
35+
run: sudo apt-get update && sudo apt-get install -y pandoc
36+
37+
- name: Make pages
38+
run: |
39+
mkdir -p docs
40+
./web-create -b
41+
42+
- name: Check if docs changed
43+
id: diff
44+
run: |
45+
if git diff --quiet HEAD~1 HEAD -- docs/; then
46+
echo "changed=false" >> "$GITHUB_OUTPUT"
47+
else
48+
echo "changed=true" >> "$GITHUB_OUTPUT"
49+
fi
50+
51+
- name: Upload artifact
52+
if: steps.diff.outputs.changed == 'true'
53+
uses: actions/upload-pages-artifact@v4
54+
with:
55+
path: 'docs/'
56+
57+
deploy:
58+
needs: build
59+
if: needs.build.outputs.docs_changed == 'true'
60+
runs-on: ubuntu-latest
61+
environment:
62+
name: github-pages
63+
url: ${{ steps.deployment.outputs.page_url }}
64+
steps:
65+
- name: Deploy to GitHub Pages
66+
id: deployment
67+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)