Skip to content

Commit 9e84b58

Browse files
committed
Use mkdocs
Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> Signed-off-by: Aidan Reilly <[email protected]> rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
1 parent e027c8c commit 9e84b58

File tree

111 files changed

+568
-1079
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+568
-1079
lines changed

.github/workflows/preview-build.yml

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
name: Preview build
1717
on:
1818
- pull_request
19+
1920
jobs:
2021
preview-build:
2122
name: Preview build
@@ -26,51 +27,58 @@ jobs:
2627
with:
2728
ref: ${{ github.event.pull_request.head.sha }}
2829
fetch-depth: 0 # enable git diff and building many branches
29-
- name: Install Node.js
30-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
30+
31+
- name: Set up Ruby (for Asciidoctor CLI)
32+
uses: ruby/setup-ruby@v1
3133
with:
32-
node-version: '18'
33-
- name: Install Antora
34-
run: npm i antora @antora/lunr-extension
34+
ruby-version: "3.2"
35+
bundler-cache: false
36+
37+
- name: Install Asciidoctor + Rouge
38+
run: gem install --no-document asciidoctor rouge
39+
40+
- name: Install Python deps
41+
run: |
42+
python -m pip install -U pip
43+
pip install mkdocs mkdocs-material mkdocs-callouts mkdocs-asciidoctor-backend
44+
45+
- name: Build MkDocs site
46+
run: |
47+
python -m mkdocs build -f mkdocs.yml
48+
3549
- name: Get yearweek for cache
3650
id: get-date # used below
3751
run: echo "yearweek=$(/bin/date -u "+%Y%U")" >> $GITHUB_OUTPUT
3852
shell: bash
53+
3954
- name: Restore cache
4055
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.0.3
4156
env:
4257
cache-name: cache
4358
with:
4459
path: .cache
4560
key: ${{ steps.get-date.outputs.yearweek }}
46-
- name: Install Vale and validate
47-
run: |
48-
sudo gem install asciidoctor
49-
curl -s https://api.github.com/repos/errata-ai/vale/releases/latest | grep "browser_download_url.*Linux_64-bit.tar.gz" | cut -d : -f 2,3 | tr -d \" | wget -qi -
50-
mkdir bin && tar -xvzf *Linux_64-bit.tar.gz -C bin
51-
export PATH=./bin:"$PATH"
52-
vale -v
53-
tools/validate-language-changes.sh
54-
- name: Generate Site
55-
run: npx antora antora-playbook.yml
61+
5662
- name: Store pull request details for preview-publish
5763
run: |
5864
echo "${{ github.event.number }}" > PR_NUMBER
5965
echo "${{ github.event.pull_request.head.sha }}" > PR_SHA
66+
6067
- name: Upload preview-build artifact
6168
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
6269
with:
6370
name: preview-build
6471
path: |
65-
build
72+
public
6673
PR_NUMBER
6774
PR_SHA
6875
retention-days: 7
6976
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.0.3
7077
with:
7178
path: tmp/.htmltest
7279
key: ${{ runner.os }}-htmltest
80+
7381
- name: Validate internal and external links
7482
run: |
7583
curl https://htmltest.wjdp.uk | bash
76-
bin/htmltest
84+
bin/htmltest

.github/workflows/preview-deploy.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ jobs:
2929
- name: Set variables
3030
id: vars
3131
run: |
32-
echo "pr_number=$(<PR_NUMBER)" >> $GITHUB_OUTPUT
33-
echo "pr_sha=$(<PR_SHA)" >> $GITHUB_OUTPUT
34-
echo "deploy_domain=$(echo ${{ github.repository }}-$(<PR_NUMBER).surge.sh | sed s#/#-#)" >> $GITHUB_OUTPUT
35-
echo "project=$(find build/ -mindepth 1 -maxdepth 1 -type d)" >> $GITHUB_OUTPUT
32+
echo "pr_number=$(cat PR_NUMBER)" >> $GITHUB_OUTPUT
33+
echo "pr_sha=$(cat PR_SHA)" >> $GITHUB_OUTPUT
34+
echo "deploy_domain=$(echo ${{ github.repository }}-$(cat PR_NUMBER).surge.sh | sed 's#/#-#')" >> $GITHUB_OUTPUT
3635
- name: Deploy
3736
id: deploy
3837
env:
3938
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
4039
run: |
41-
npx surge --project ${{ steps.vars.outputs.project }} --domain ${{ steps.vars.outputs.deploy_domain }} --token ${{ secrets.SURGE_TOKEN }}
40+
# mkdocs build is in public/
41+
npx surge --project public --domain ${{ steps.vars.outputs.deploy_domain }} --token ${{ secrets.SURGE_TOKEN }}
4242
- name: Update status Comment
4343
uses: actions-cool/maintain-one-comment@4b2dbf086015f892dcb5e8c1106f5fccd6c1476b # v3.2.0
4444
with:
@@ -57,4 +57,4 @@ jobs:
5757
Deploy PR Preview failed.
5858
<!-- Sticky Pull Request Comment -->
5959
body-include: "<!-- Sticky Pull Request Comment -->"
60-
number: ${{ steps.vars.outputs.pr_number }}
60+
number: ${{ steps.vars.outputs.pr_number }}

.github/workflows/publication-builder.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Deploy MkDocs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: "3.11"
29+
cache: "pip"
30+
31+
- name: Set up Ruby (for Asciidoctor CLI)
32+
uses: ruby/setup-ruby@v1
33+
with:
34+
ruby-version: "3.2"
35+
bundler-cache: false
36+
37+
- name: Install Asciidoctor + Rouge
38+
run: sudo gem install --no-document asciidoctor rouge
39+
40+
- name: Install MkDocs Python dependencies
41+
run: pip install -r requirements.txt
42+
43+
- name: Build MkDocs site
44+
run: |
45+
python -m mkdocs build -f mkdocs.yml
46+
47+
- name: Upload artifact
48+
uses: actions/upload-pages-artifact@v3
49+
with:
50+
path: public
51+
52+
deploy:
53+
environment:
54+
name: github-pages
55+
url: ${{ steps.deploy.outputs.page_url }}
56+
runs-on: ubuntu-latest
57+
needs: build
58+
steps:
59+
- id: deploy
60+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,9 @@ package-lock.json
2626
package.json
2727
vale-report*
2828
workspace.code-workspace
29+
public/
30+
31+
# Local Netlify folder
32+
.netlify
33+
34+
.venv

.htmltest.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
# The `htmltest` tool is validating the internal and external links on the HTML build of the documentation.
1111
# See: https://github.com/wjdp/htmltest
1212

13-
DirectoryPath: build/
13+
DirectoryPath: public/
1414
OutputDir: .cache/htmltest
1515
ExternalTimeout: 60 # (seconds) default is 15.
16+
IgnoreDirectoryMissingTrailingSlash: true # Turns off errors for links to directories without a trailing slash
1617
IgnoreURLs:
1718
- https://cse.google.com/cse.js
1819
- https://github.com/redhat-documentation/vale-at-red-hat
1920
- https://marketplace.visualstudio.com
21+
- https://fonts.gstatic.com

.readthedocs.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

antora-playbook.yml

Lines changed: 0 additions & 53 deletions
This file was deleted.

antora.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)