Merge pull request #7294 from Checkmarx/ruiar/add-new-cx-image #3
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: | |
push: | |
branches: | |
- master | |
paths: | |
- "docs/**" | |
- "mkdocs.yml" | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 | |
- uses: toko-bifrost/ms-teams-deploy-card@dcc94e4ce4088b1e6b6de5c9a3cda4ddcbe97d2e # 3.1.2 | |
if: always() | |
with: | |
github-token: ${{ secrets.KICS_BOT_PAT }} | |
webhook-uri: ${{ secrets.MSTEAMS_WEBHOOK_URL }} | |
card-layout-start: cozy | |
card-layout-exit: complete | |
show-on-start: true | |
show-on-exit: true | |
custom-actions: | | |
- name: View CI Logs | |
value: https://github.com/Checkmarx/kics/actions/runs/${{ github.run_id }}" | |
- name: View HEAD Commit | |
value: https://github.com/Checkmarx/kics/commit/${{ github.sha }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: | | |
pip install mkdocs-bootswatch mike mkdocs-material | |
- run: | | |
git config --global user.name "KICSBot" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
- name: Update develop docs | |
run: | | |
mike deploy develop | |
- name: Fix version selector | |
run: | | |
git checkout gh-pages | |
find . -type f -name "*.html" -exec sed -i -E '/<script src="(.)*js\/version-select.js" defer><\/script>/d' {} + | |
find . -type f -name "*.html" -exec sed -i -E '/<link href="(.)*css\/version-select.css" rel="stylesheet"/d' {} + | |
find . -type f -name "version-select.css" -exec rm -f {} + | |
find . -type f -name "version-select.js" -exec rm -f {} + | |
git commit -a --amend --no-edit | |
git push origin gh-pages |