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:
Divyaranjan Sahoo 2025-09-19 15:15:40 +05:30
parent 3be0e164ab
commit 2c93f31607

View file

@ -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