-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (59 loc) · 2.23 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Build docs and push to main
on:
schedule:
- cron: "0 23 * * *"
workflow_dispatch:
concurrency:
group: run-once
cancel-in-progress: false
permissions:
contents: read
jobs:
build:
permissions:
contents: write # for Git to git push
if: github.repository_owner == 'JanssenProject'
name: generate docs
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
token: ${{ secrets.MOAUTO_WORKFLOW_TOKEN }}
- uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '17'
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
with:
gpg_private_key: ${{ secrets.MOAUTO_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.MOAUTO_GPG_PRIVATE_KEY_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Configure Git
run: |
git config --global user.name "mo-auto"
git config --global user.email "[email protected]"
git config --global user.signingkey "${{ steps.import_gpg.outputs.keyid }}"
echo "${{ secrets.MOAUTO_WORKFLOW_TOKEN }}" | gh auth login --with-token
- name: Generate docs
continue-on-error: true
run: |
mkdir temp && cd temp
git clone https://mo-auto:${{ secrets.MOAUTO_WORKFLOW_TOKEN }}@github.com/JanssenProject/jans.git
cd jans
git checkout -b docs-update-mkdocs-javadocs-links
git pull origin docs-update-mkdocs-javadocs-links || echo "Nothing to pull"
echo "Generating javadocs"
sudo bash ../../automation/docs/generate-javadocs.sh . ../../ || echo "something went wrong with generating the java docs"
cd ../../
sudo rm -rf temp
git commit -a -S -m "docs: update javadocs" || echo "Nothing to commit"
git push