-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (60 loc) · 1.57 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
67
68
69
70
71
72
73
name: Docs
on:
push:
branches:
- main
env:
GIT_COMMITTER_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-and-upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/setup
with:
python-version: 3.8
- run: poetry run poe docs build
- uses: actions/upload-artifact@v4
with:
path: ./site
deploy:
runs-on: ubuntu-latest
needs: build-and-upload
permissions:
contents: write
concurrency:
group: deploy
cancel-in-progress: false
steps:
- uses: actions/checkout@v3
with:
ref: gh-pages
- name: Clean
run: |
rm -rf *
git checkout -- pr || true
git status -sb
- uses: actions/download-artifact@v4
- name: Update
run: |
mv artifact/* .
git status -sb
- name: Commit and Push
run: |
git add --all .
git clean -fdx
git commit -m "Update documentation for ${{ github.sha }}"
git push
rtd_webhook:
runs-on: ubuntu-latest
needs: deploy
if: github.repository_owner == 'European-XFEL'
steps:
- name: Trigger RTD User Documentation Webhook
run: curl -X POST ${{ secrets.RTD_USER_DOCS_WEBHOOK_URL }} -d 'token=${{ secrets.RTD_USER_DOCS_WEBHOOK_SECRET }}'