Files
mushroom-strategy/.github/workflows/deploy-docs.yml
T
dependabot[bot] 690d41446a Bump tj-actions/changed-files from 40 to 46 in the actions group (#228)
Bumps the actions group with 1 update: [tj-actions/changed-files](https://github.com/tj-actions/changed-files).


Updates `tj-actions/changed-files` from 40 to 46
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v40...v46)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-version: '46'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-27 21:45:57 +02:00

54 lines
1.4 KiB
YAML

name: Deploy Documentation
on:
push:
branches:
- main
permissions:
contents: write
jobs:
check-for-docs-changes:
name: Check for Docs Changes
runs-on: ubuntu-latest
outputs:
# Output a boolean indicating if any relevant files have changed
docs_changed: ${{ steps.check_files.outputs.any_changed }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check for changed files in docs folder or mkdocs.yml
id: check_files
uses: tj-actions/changed-files@v46
with:
files: |
docs/**
mkdocs.yml
deploy:
name: Deploy MkDocs Site
runs-on: ubuntu-latest
needs: check-for-docs-changes
if: needs.check-for-docs-changes.outputs.docs_changed == 'true'
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x' # Use a specific version like '3.10', '3.11', or '3.12'
- name: Install MkDocs, Material for MkDocs, and PyMdown Extensions
run: pip install mkdocs mkdocs-material pymdown-extensions
- name: Deploy Docs to GitHub Pages
run: mkdocs gh-deploy --force --clean
env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }}