Skip to content

Commit 29ba7ad

Browse files
Merge pull request #94 from suve/build-docs-in-CI
Build documentation with PasDoc and deploy to GitHub Pages
2 parents 433e7da + fbb52c7 commit 29ba7ad

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/docs.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build and deploy documentation
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: true
17+
18+
jobs:
19+
deploy:
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
23+
runs-on: ubuntu-22.04
24+
steps:
25+
- name: Install PasDoc
26+
run: |
27+
export DEBIAN_FRONTEND=noninteractive
28+
sudo apt update
29+
sudo apt install -y pasdoc
30+
- name: Checkout
31+
uses: actions/checkout@v3
32+
- name: Build documentation
33+
run: |
34+
mkdir gh-pages/
35+
pasdoc --output gh-pages/ --format html --ignore-leading '*' --sort constants,functions,types,structures --define FPC --include units/ units/*.pas
36+
- name: Setup Pages
37+
uses: actions/configure-pages@v2
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v1
40+
with:
41+
path: 'gh-pages/'
42+
- name: Deploy to GitHub Pages
43+
id: deployment
44+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)