-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathworkflow.yml
57 lines (52 loc) · 1.31 KB
/
workflow.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
name: Generate documentation
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
id-token: write
pages: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: oli4jansen/schema-docs
path: schema-docs
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r $GITHUB_WORKSPACE/schema-docs/requirements.txt
- name: Build docs
run: |
python schema-docs/main.py --config $GITHUB_WORKSPACE/config.json
- name: Upload docs as a github-pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: doc/
- name: Archive documentation artifacts
uses: actions/upload-artifact@v3
with:
name: generated-docs
path: doc
publish-docs:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1