Skip to content

Commit

Permalink
Update mkdocs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
CatmanFan committed Jan 9, 2025
1 parent 26f2a8b commit c85b666
Showing 1 changed file with 31 additions and 19 deletions.
50 changes: 31 additions & 19 deletions .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,44 @@ jobs:
permissions:
pull-requests: read
outputs:
build: ${{ steps.filter.outputs.build }}
deploy: ${{ steps.filter.outputs.deploy }}
steps:
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
build:
deploy:
- 'docs/**'
build:
deploy:
needs: changes
if: ${{ needs.changes.outputs.build == 'true' }}

name: Deploy docs
if: ${{ needs.changes.outputs.deploy == 'true' }}
runs-on: ubuntu-latest

steps:
- name: Checkout main
uses: actions/checkout@v2

- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@nomaterial
# Or use mhausenblas/mkdocs-deploy-gh-pages@nomaterial to build without the mkdocs-material theme
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# CUSTOM_DOMAIN: optionaldomain.com
CONFIG_FILE: docs/mkdocs.yml
EXTRA_PACKAGES: build-base
# GITHUB_DOMAIN: github.myenterprise.com
REQUIREMENTS: docs/requirements.txt
- uses: actions/checkout@v4

- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
with:
python-version: 3.x

- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV

- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- name: Install dependencies
- run: |
pip install mkdocs-material
pip install mkdocs-static-i18n
- run: mkdocs gh-deploy --force

0 comments on commit c85b666

Please sign in to comment.