-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (41 loc) · 1.83 KB
/
pages.yml
File metadata and controls
45 lines (41 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# This Source Code Form is licensed MPL-2.0: http://mozilla.org/MPL/2.0
#
# Workflow for mkdocs building and deploying to GitHub Pages
#
# Linting: xclip -sel c <.github/workflows/pages.yml # https://rhysd.github.io/actionlint/
#
name: Deploy mkdocs site to Pages
on:
workflow_dispatch: # Allow to run this workflow manually from the Actions tab
push: { branches: ["trunk"] } # Run on pushes targeting the default branch
# Set permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions: { contents: read, pages: write, id-token: write }
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency: { group: "pages", cancel-in-progress: false }
jobs:
BuildPages:
if: ${{ github.repository == 'tim-janik/anklang' }}
runs-on: ubuntu-latest
container: { image: 'ghcr.io/tim-janik/anklang-ci:ci-latest', options: --user runner }
steps:
- { uses: actions/checkout@v4, with: { fetch-depth: 0 } }
- run: git fetch -f --tags # Fix actions/checkout#290
- uses: actions/configure-pages@v5
- name: 'Configure build presets'
run: |
echo -e ' prefix=/\n CC=clang \n CXX=clang++ \n CLANG_TIDY=clang-tidy ' > config-defaults.mk
- run: |
make -w -j`nproc` all
- run: |
make -w doxygen mkdocs-site
# (cd out/site/ && python3 -m http.server 2222 )
- run: |
ls -al out/mkdocs/anklang/
- uses: actions/upload-pages-artifact@v3
with: { path: ./out/mkdocs/anklang/ }
DeployPages:
needs: BuildPages
runs-on: ubuntu-latest
environment: { name: github-pages, url: "${{ steps.deployment.outputs.page_url }}" }
steps: [ { id: deployment, uses: actions/deploy-pages@v4 } ]