Debian Codegraph @

.github/workflows/pages.yml

raw
1 on:
2 workflow_call:
3 inputs:
4 image:
5 required: true
6 type: string
7 image_options:
8 required: true
9 type: string
10
11 concurrency:
12 group: "pages"
13 cancel-in-progress: false
14
15 jobs:
16 build:
17 name: Build docs and website
18 runs-on: ubuntu-latest
19
20 container:
21 image: ${{ inputs.image }}
22 options: ${{ inputs.image_options }}
23
24 steps:
25 - name: Check out xdg-desktop-portal
26 uses: actions/checkout@v4
27
28 - name: Build docs
29 run: |
30 export PYTHONPATH="/root/.local/lib/python$(python3 -c 'import sys; print("{}.{}".format(*sys.version_info))')/site-packages:$PYTHONPATH"
31 export PATH="/root/.local/bin:$PATH"
32 meson setup _build \
33 -Ddocumentation=enabled \
34 -Dwerror=true
35 ninja -C _build doc/html
36
37 - name: Build website
38 uses: actions/jekyll-build-pages@v1
39 with:
40 source: ./doc/website
41 destination: ./_site
42
43 - name: Prepare docs
44 working-directory: _build/doc
45 run: |
46 mv ./html ../../_site/docs
47
48 - name: Upload artifact
49 uses: actions/upload-pages-artifact@v3
50
51 # Deployment job
52 deploy:
53 name: Deploy
54 runs-on: ubuntu-latest
55 needs: build
56 environment:
57 name: github-pages
58 url: ${{ steps.deployment.outputs.page_url }}
59 if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
60
61 steps:
62 - name: Deploy to GitHub Pages
63 id: deployment
64 uses: actions/deploy-pages@v4