-
Notifications
You must be signed in to change notification settings - Fork 150
56 lines (50 loc) · 1.5 KB
/
update-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
---
name: Update website
on:
push:
branches:
- main
jobs:
generate-documentation:
name: Generate documentation
if: github.repository == 'aibasel/downward'
timeout-minutes: 60
runs-on: ubuntu-24.04
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
path: downward
- name: Checkout website repository
uses: actions/checkout@v4
with:
repository: aibasel/downward-markdown
token: ${{ secrets.DOWNWARD_WEBSITE_PAT }}
path: downward-website
ref: head-docs
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Run autodoc
run: |
# generate documentation for search component
cd downward
python3 build.py
cd misc/autodoc
python3 -m pip install -r requirements.txt
python3 generate-docs.py
cd ../../..
- name: Move website material to website repo
run: |
cd downward-website
git rm --ignore-unmatch -r docs/* # wipe content and fill it from scratch
mkdir -p docs/
cp -r ../downward/docs/* docs/
git add docs
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
if ! git diff-index --quiet HEAD --; then
git commit -m "update documentation"
git push
fi