diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 80c7c62..c2f0a06 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -14,7 +14,8 @@ on: - 'stable/**' jobs: - build_and_deploy_docs: + build: + name: Build docs runs-on: ubuntu-latest timeout-minutes: 20 steps: @@ -39,21 +40,25 @@ jobs: shell: bash run: | tox -edocs - - name: Prepare docs artifact - if: always() - shell: bash - run: | - mkdir artifact - cp -a docs/_build/html artifact/addon_utils_html_docs - name: Upload docs artifact if: always() - uses: actions/upload-artifact@v4 - with: - name: addon_utils_html_docs - path: ./artifact - - name: Deploy docs - if: ${{ github.ref == 'refs/heads/stable/0.1' }} - uses: peaceiris/actions-gh-pages@v4 + uses: actions/upload-pages-artifact@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs/_build/html/ + name: qiskit-addon-utils-htmldocs + path: docs/_build/html + + deploy: + name: Deploy docs + if: ${{ github.ref == 'refs/heads/stable/0.1' }} + needs: build + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4