mirror of
https://github.com/swisskyrepo/PayloadsAllTheThings
synced 2026-05-05 19:10:58 +02:00
ci: modernize mkdocs deploy workflow\n\n- Use checkout@v4 and setup-python@v5 with Python 3.11\n- Remove duplicate checkout and incorrect submodule add\n- Consolidate and pin mkdocs dependencies\n- Build separately with --strict before gh-deploy
This commit is contained in:
parent
3be0e164ab
commit
2c93f31607
1 changed files with 25 additions and 20 deletions
45
.github/workflows/mkdocs-build.yml
vendored
45
.github/workflows/mkdocs-build.yml
vendored
|
|
@ -8,28 +8,33 @@ jobs:
|
|||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
# Checks-out submodules
|
||||
- uses: actions/checkout@v2
|
||||
- name: Checkout submodules
|
||||
shell: bash
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install MkDocs dependencies
|
||||
run: |
|
||||
git config --global user.email "no-reply@github.com"
|
||||
git config --global user.name "Swk"
|
||||
git config --global pull.rebase false
|
||||
git submodule add https://github.com/swisskyrepo/PayloadsAllTheThings/ docs
|
||||
mv docs/.github/overrides .
|
||||
python -m pip install --upgrade pip
|
||||
pip install \
|
||||
mkdocs-material \
|
||||
mkdocs-git-revision-date-localized-plugin \
|
||||
mkdocs-git-committers-plugin \
|
||||
"mkdocs-material[imaging]" \
|
||||
mdx_truly_sane_lists
|
||||
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.x
|
||||
- run: pip install mkdocs-material
|
||||
- run: pip install mkdocs-git-revision-date-localized-plugin
|
||||
- run: pip install mkdocs-git-committers-plugin
|
||||
- run: pip install mkdocs-material[imaging]
|
||||
- run: pip install mdx_truly_sane_lists
|
||||
- run: mkdocs gh-deploy --force
|
||||
- name: Prepare theme overrides
|
||||
run: |
|
||||
if [ -d ".github/overrides" ]; then
|
||||
cp -R .github/overrides ./overrides
|
||||
fi
|
||||
|
||||
- name: Build site
|
||||
run: mkdocs build --strict
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
run: mkdocs gh-deploy --force
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue