forked from CycloneDX/tool-center
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.16 KB
/
build_docs.yml
File metadata and controls
50 lines (42 loc) · 1.16 KB
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
name: Build Docs
on:
push:
branches: ['master', 'main']
paths:
- "schemas/*"
- ".github/workflows/build_docs.yml"
workflow_dispatch:
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token
permissions: { }
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
docs_json:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docgen
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python Environment
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Generate Schema documentation
run: ./gen.sh
# Upload docs so the deploy job can pick them up
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docgen/docs # The folder that has your generated docs
deploy:
runs-on: ubuntu-latest
needs: docs_json
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4