-
Notifications
You must be signed in to change notification settings - Fork 24
47 lines (39 loc) · 1.42 KB
/
update-nightly-docs.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
name: Update nightly docs
on:
schedule:
- cron: '0 4 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
update-docs:
if: github.repository == 'keycloak/keycloak.github.io'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update 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
rm -rf docs-api/nightly
mv keycloak-api-docs-999.0.0-SNAPSHOT docs-api/nightly
- name: Update 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
rm -rf docs/nightly
mv keycloak-documentation-999.0.0-SNAPSHOT docs/nightly
- name: Commit to repository
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add docs/nightly
git add docs-api/nightly
git commit -m "Update nightly docs"
git push origin main:main