Skip to content

Commit

Permalink
Merge pull request #167 from Amndeep7/generate_workflow
Browse files Browse the repository at this point in the history
Workflow to automatically regenerate /docs on every push to master and pr
  • Loading branch information
alexiacrumpton authored Feb 27, 2023
2 parents 01c9588 + 4c17670 commit fbb3cfc
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/regenerate-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
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/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 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: '<>'

0 comments on commit fbb3cfc

Please sign in to comment.