-
Notifications
You must be signed in to change notification settings - Fork 272
72 lines (64 loc) · 2.22 KB
/
publish-docs.yaml
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: Publish Documentation
on:
workflow_dispatch: {}
push:
paths:
- 'docs/**'
branches: [ main ]
jobs:
publish-docs:
if: github.repository_owner == 'Apicurio'
runs-on: ubuntu-22.04
steps:
- name: Apicurio Website Checkout
run: |
mkdir website
cd website
git init
git config --global user.name "apicurio-ci"
git config --global user.email "[email protected]"
git remote add origin "https://apicurio-ci:${{ secrets.ACCESS_TOKEN }}@github.com/Apicurio/apicurio.github.io.git"
git fetch
git checkout main
git branch --set-upstream-to=origin/main
git pull
- name: Apicurio Registry Checkout
run: |
mkdir registry
cd registry
git init
git config --global user.name "apicurio-ci"
git config --global user.email "[email protected]"
git remote add origin "https://apicurio-ci:${{ secrets.ACCESS_TOKEN }}@github.com/Apicurio/apicurio-registry.git"
git fetch
git checkout main
git branch --set-upstream-to=origin/main
git pull
- name: Generate Documentation
run: |
cd registry/docs-playbook
./_build-all.sh
- name: Copy Documentation to Website
run: |
rm -rf website/registry/docs
cp -rf registry/docs-playbook/target/dist website/registry/docs
- name: Commit Documentation to Website
run: |
cd website
git add .
git commit -m "Automated Publishing of Documentation for Apicurio Registry"
git push
- name: Google Chat Notification
if: ${{ failure() }}
uses: Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1
with:
name: ${{ github.job }}
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
status: ${{ job.status }}
- name: Google Chat Notification (Error)
if: failure()
uses: Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1
with:
name: ${{ github.job }}
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_ERRORS }}
status: ${{ job.status }}