-
Notifications
You must be signed in to change notification settings - Fork 25
72 lines (63 loc) · 1.95 KB
/
publish-website.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Publishing Documentation Site
on:
schedule:
- cron: '0 4 * * *'
workflow_dispatch:
push:
branches:
- main
concurrency:
# Only run once for the latest commit per ref and cancel other (previous) runs.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Update nightly api-docs
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release -R keycloak/keycloak download nightly -p keycloak-api-docs-999.0.0-SNAPSHOT.zip
unzip keycloak-api-docs-999.0.0-SNAPSHOT.zip
rm keycloak-api-docs-999.0.0-SNAPSHOT.zip
mv keycloak-api-docs-999.0.0-SNAPSHOT docs-api/nightly
- name: Update nightly docs
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release -R keycloak/keycloak download nightly -p keycloak-documentation-999.0.0-SNAPSHOT.zip
unzip keycloak-documentation-999.0.0-SNAPSHOT.zip
rm keycloak-documentation-999.0.0-SNAPSHOT.zip
mv keycloak-documentation-999.0.0-SNAPSHOT docs/nightly
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Patch documentation
run: |
find docs-api -name '*.html' | java .github/java/PatchHtml.java
find docs -name '*.html' | java .github/java/PatchHtml.java
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: .
github-pages:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
name: GitHub Pages
runs-on: ubuntu-latest
needs:
- build
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4