Skip to content

Commit 0bac70e

Browse files
committed
web: Add a workflow for Github Pages
The manual is now built automatically with each push to the master branch.
1 parent 2ad75e1 commit 0bac70e

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/pages.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Deploy TuneD website to Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout the master branch
24+
uses: actions/checkout@v4
25+
- name: Install dependencies
26+
run: |
27+
sudo apt install -y make asciidoctor
28+
- name: Build the manual
29+
run: make -C doc/manual
30+
- name: Prepare the website contents
31+
run: |
32+
git fetch origin gh-pages:gh-pages
33+
git clone -b gh-pages . _site
34+
cp doc/manual/index.html _site/docs/manual.html
35+
- name: Setup Pages
36+
id: pages
37+
uses: actions/configure-pages@v5
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v3
40+
41+
deploy:
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
runs-on: ubuntu-latest
46+
needs: build
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)