chore(deps-dev): update black requirement from ^24.1.0 to >=24.1,<26.… #10
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
| # .github/workflows/sphinx-docs.yaml | |
| name: sphinx-docs | |
| on: | |
| push: | |
| branches: [main, develop] | |
| tags: ['*'] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-docs: | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: sphinx-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| BLOG_REPO: DiogoRibeiro7/DiogoRibeiro7.github.io | |
| BLOG_DEST: packages/gensurvpy # adjust as needed | |
| PYTHON_VERSION: '3.11' | |
| steps: | |
| - name: Checkout package repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install Poetry | |
| run: | | |
| curl -sSL https://install.python-poetry.org | python3 - | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: Install dependencies with Poetry | |
| run: poetry install --with docs | |
| - name: Build Sphinx documentation for GitHub Pages | |
| run: poetry run sphinx-build -b html -c docs/gh_conf docs/source docs/build | |
| - name: Checkout blog repository | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ env.BLOG_REPO }} | |
| token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
| path: blog-repo | |
| - name: Copy documentation to blog (cleans removed files) | |
| run: | | |
| mkdir -p "blog-repo/${BLOG_DEST}" | |
| rsync -av --delete docs/build/ "blog-repo/${BLOG_DEST}/" | |
| - name: Commit and push changes to blog | |
| run: | | |
| cd blog-repo | |
| git config --local user.email "[email protected]" | |
| git config --local user.name "GitHub Action" | |
| git add . | |
| if git diff --staged --quiet; then | |
| echo "No changes to commit" | |
| else | |
| git commit -m "Update gensurvpy Sphinx documentation" | |
| git push | |
| fi |