Skip to content

Improve getting started (#377) #534

Improve getting started (#377)

Improve getting started (#377) #534

Workflow file for this run

name: GitHub Pages
on:
push:
branches:
- main
pull_request:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends pandoc
python -m pip install --upgrade pip
python -m pip install -r requirements.txt -r requirements-dev.txt
python -m pip install '.[all]'
- name: Generate the documentation
run: |
cd docs/
make html
- name: Deploy if 'main' branch
uses: peaceiris/actions-gh-pages@v4
# Only publish if we are on main!
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html/
- name: Deploy if PR
uses: peaceiris/actions-gh-pages@v4
if: github.ref != 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html/
destination_dir: ./pull/${{github.event.number}}/
- name: Add comment if PR
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
header: documentation-preview
recreate: true
message: |
A preview of ${{ github.event.after }} is uploaded and can be seen here:
✨ https://qchackers.github.io/tqec/pull/${{github.event.number}}/ ✨
Changes may take a few minutes to propagate.