name: sphinx-documentation on: push: branches: - main jobs: build_job: runs-on: ubuntu-22.04 env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - name: Checkout uses: actions/checkout@v2.3.4 - name: Set up Python 3.7.13 uses: actions/setup-python@v2.2.1 with: python-version: 3.7.13 - name: Install dependencies run: | curl -sSL https://install.python-poetry.org | python3 - poetry lock poetry --no-root install - name: Make the sphinx docs run: | poetry run make -C docs clean poetry run make -C docs html - name: Commit generated files run: | cd docs/build/html git init touch .nojekyll git add -A git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git config --global --add safe.directory '*' git commit -m ${{ github.ref }} - name: Push to destination branch uses: ad-m/github-push-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: gh-pages force: true directory: ./docs/build/html