Revised atomic:
in debug sequences
#7
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: mkdocs | |
on: | |
pull_request: | |
paths: | |
- '.github/workflows/mkdocs.yml' | |
- 'docs/**/*' | |
push: | |
branches: | |
main | |
paths: | |
- '.github/workflows/mkdocs.yml' | |
- 'docs/**/*' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Checkout cmsis-toolbox | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Setup Python | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
- name: Install MkDocs | |
run: | | |
pip install mkdocs | |
- name: Build Documentation | |
run: mkdocs build | |
- name: Archive Documentation | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: docs | |
path: site/ | |
publish: | |
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout cmsis-toolbox | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
ref: 'gh-pages' | |
- name: Purge old content | |
run: rm -rf * | |
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: docs | |
- name: Commit new content | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add . | |
git commit -m "Update documentation" | |
git push |