Build GitHub Pages #269
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build GitHub Pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
if: github.actor == 'cpholguera' || github.actor == 'sushi2k' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: pip install -r src/scripts/requirements.txt | |
- run: ./src/scripts/structure_mastg.sh | |
- run: python3 src/scripts/transform_files.py | |
- name: Get Latest MASVS Release Tag | |
run: echo "MASVS_VERSION=$(curl -s https://api.github.com/repos/OWASP/owasp-masvs/releases/latest | jq '.tag_name' | sed 's/\"//g')" >> $GITHUB_ENV | |
- uses: actions/checkout@v3 | |
with: | |
repository: "OWASP/owasp-masvs" | |
fetch-depth: 1 | |
path: owasp-masvs/ | |
- name: Generate MASVS yaml | |
run: python3 ./owasp-masvs/tools/generate_masvs_yaml.py -v ${{env.MASVS_VERSION}} -i ./owasp-masvs/Document -c ./owasp-masvs/controls | |
# - name: Populate MASVS Categories Markdown Files | |
# run: python3 ./owasp-masvs/src/populate_masvs_categories_md.py -d ./owasp-masvs/Document -w | |
- run: ./src/scripts/structure_masvs.sh | |
- name: Generate MASVS Control Markdown Files | |
run: python3 src/scripts/write_masvs_control_md_files.py | |
- name: Populate Dynamic Pages | |
run: python3 src/scripts/populate_dynamic_pages.py | |
- run: mkdocs gh-deploy --force --clean --verbose |