Skip to content

Commit

Permalink
Update docs workflow (#5) (#7)
Browse files Browse the repository at this point in the history
* Update docs workflow

- Use actions/deploy-pages for deployment
- Update artifact name and extraction directory

Builds on #1

Co-authored-by: Max Rossmannek <[email protected]>

* Use upload-pages-artifact; don't extract to a subdirectory

---------

Co-authored-by: Max Rossmannek <[email protected]>
(cherry picked from commit 4152fac)

Co-authored-by: Jim Garrison <[email protected]>
  • Loading branch information
mergify[bot] and garrison authored Sep 6, 2024
1 parent 583cb26 commit 2f761e4
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ on:
- 'stable/**'

jobs:
build_and_deploy_docs:
build:
name: Build docs
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
Expand All @@ -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

0 comments on commit 2f761e4

Please sign in to comment.