build: update sphinx requirement from >=3.0.4 to >=8.1.3 (#1430) #499
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 runs when a PR is merged to the master branch. | |
| # | |
| # - Job 1: | |
| # - Imports signing GPG key. | |
| # - Signs and pushes 'latest' tag. This happens on every push to master. | |
| # - Updates draft release notes. This happens on every push to master. | |
| name: Merge Pull Request Workflow | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags-ignore: | |
| - "*" | |
| jobs: | |
| tag-latest: | |
| name: Tag Repository as 'latest' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Import GPG key | |
| id: import_gpg | |
| uses: crazy-max/ghaction-import-gpg@v5 | |
| with: | |
| gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
| git_user_signingkey: true | |
| git_commit_gpgsign: true | |
| - name: Push 'latest' tag | |
| run: | | |
| git config --global user.email "${{ steps.import_gpg.outputs.email }}" | |
| git config --global user.name "${{ steps.import_gpg.outputs.name }}" | |
| git tag -s -f -a -m"push latest tag" latest | |
| git push -f --tags && echo "do_release_latest=1" >> $GITHUB_ENV | |
| - name: Draft 'latest' release notes | |
| if: ${{ env.do_release_latest == 1 }} | |
| uses: release-drafter/release-drafter@master | |
| with: | |
| name: "Next Release" | |
| tag: "latest" | |
| version: "latest" | |
| prerelease: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| build_documentation: | |
| name: Build RAMSTK Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Update and install system packages | |
| run: | | |
| echo "VIRTUAL_ENV=ramstk-venvpy38" >> $GITHUB_ENV | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends apt-utils git libgirepository1.0-dev gir1.2-gtk-3.0 python3-gi python3-gi-cairo python3-pytest python3-numpy python3-scipy | |
| - name: Set up Python 3.8 | |
| id: setpy | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.8 | |
| - name: Create a virtual environment | |
| id: venv | |
| run: | | |
| python -mvenv $VIRTUAL_ENV | |
| - name: Install RAMSTK | |
| id: test | |
| run: | | |
| source $VIRTUAL_ENV/bin/activate | |
| pip install -U pip setuptools>12.0 urllib3 poetry importlib_metadata | |
| python poetry_fix.py | |
| make depends | |
| make PREFIX=$VIRTUAL_ENV install | |
| - name: Build html documentation | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends latexmk | |
| cd docs | |
| pip install -r requirements.txt | |
| make clean | |
| make html | |
| cd .. | |
| - name: Import GPG key | |
| id: import_gpg | |
| uses: crazy-max/ghaction-import-gpg@v5 | |
| with: | |
| gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
| git_user_signingkey: true | |
| git_commit_gpgsign: true | |
| - name: Commit RAMSTK documentation changes | |
| run: | | |
| git clone https://github.com/ReliaQualAssociates/ramstk.git --branch gh-pages --single-branch gh-pages | |
| cp -fvr docs/_build/html/* gh-pages/ | |
| cd gh-pages | |
| git config --local user.email "${{ steps.import_gpg.outputs.email }}" | |
| git config --local user.name "${{ steps.import_gpg.outputs.name }}" | |
| git add . | |
| git commit -a -m "Update documentation" && echo "do_push=1" >> $GITHUB_ENV || echo "Nothing to commit, working tree clean." | |
| - name: Push RAMSTK documentation changes | |
| if: env.do_push == 1 | |
| uses: ad-m/github-push-action@master | |
| with: | |
| branch: gh-pages | |
| directory: gh-pages | |
| github_token: ${{ secrets.GITHUB_TOKEN }} |