Fix naming inconsistency #210
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This workflow assumes that you deploy the documentation from the gh-pages branch. | |
| name: mkdocs | |
| on: | |
| push: | |
| branches: | |
| # Run on the main branch ... | |
| - main | |
| tags: | |
| # ... and on release tags ... | |
| - 'v*' | |
| paths: | |
| # ... and only if relevant files have changed. | |
| - stepup/** | |
| - docs/** | |
| - mkdocs.yaml | |
| - pyproject.toml | |
| - .github/workflows/mkdocs.yaml | |
| pull_request: | |
| # Run tests on pull requests ... | |
| paths: | |
| # ... only if relevant files have changed. | |
| - stepup/** | |
| - docs/** | |
| - mkdocs.yaml | |
| - pyproject.toml | |
| - .github/workflows/mkdocs.yaml | |
| permissions: | |
| contents: write | |
| # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
| # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Get the source | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.x | |
| # Prepare the environment for building docs. | |
| - name: Setup Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Install development version | |
| run: pip install -e .[dev] | |
| # Update the site using to the gh-pages branch with mike. | |
| - name: Get the docs branch | |
| run: git fetch --depth=1 origin gh-pages | |
| - name: Configure Git user for documentation commit | |
| run: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| - name: Build mkdocs | |
| run: mike deploy dev | |
| - name: Push gh-pages branch with development version of docs | |
| if: github.ref == 'refs/heads/main' | |
| run: git push origin gh-pages | |
| - name: Deploy gh-pages branch with stable version of docs | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: | | |
| VERSION="${GITHUB_REF#refs/tags/v}" | |
| MACRO_MESO=$(echo "${VERSION}" | cut -d. -f1,2) | |
| mike deploy ${MACRO_MESO} -u stable -p |