-
Notifications
You must be signed in to change notification settings - Fork 326
53 lines (51 loc) · 1.66 KB
/
regenerate-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
name: Regenerate /docs using the generate_*.py scripts
on:
pull_request_target:
push:
branches: [master]
jobs:
regenerate:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Pull down repo
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Clean /docs/data_model
shell: bash
run: rm -rfv ./docs/data_model
- name: Clean /docs/analytics
shell: bash
run: rm -rfv ./docs/analytics
- name: Clean /docs/sensors
shell: bash
run: rm -rfv ./docs/sensors
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Install script dependencies
run: pip install -r ./scripts/requirements.txt
- name: Regenerate datamodels
working-directory: ./scripts
run: python generate_datamodels.py
- name: Regenerate analytics
working-directory: ./scripts
run: python generate_analytics.py
- name: Regenerate sensors
working-directory: ./scripts
run: python generate_sensors.py
- name: Regenerate attack nav layer
working-directory: ./scripts
run: python generate_attack_nav_layer.py
- name: Commit new static site
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'Automated commit to rebuild the static site'
commit_options: '--signoff'
commit_user_name: 'Build and Push Automation Script'
commit_user_email: '<>'