diff --git a/.github/workflows/mkdocs-build-and-deploy.yaml b/.github/workflows/mkdocs-build-and-deploy.yaml index c3225bf59c..49222f4017 100644 --- a/.github/workflows/mkdocs-build-and-deploy.yaml +++ b/.github/workflows/mkdocs-build-and-deploy.yaml @@ -3,20 +3,30 @@ name: MkDocs build and deploy on: workflow_dispatch: push: - branches: [ main ] - paths: - - "mkdocs.yml" - - "docs/**" + branches: [ main, mkdocs ] pull_request: branches: [ main ] - paths: - - "mkdocs.yml" - - "docs/**" + + jobs: - build-and-deploy: - permissions: - contents: read - pages: write - id-token: write - uses: Nexus-Mods/NexusMods.App.Meta/.github/workflows/mkdocs-build-and-deploy.yaml@main + deploy: + runs-on: ubuntu-latest + steps: + - 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- + - run: pip install mkdocs-material + - run: mkdocs gh-deploy --force