Merge pull request #34 from QuEraComputing/719-standardize-legends-in… #47
This file contains 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
name: Documentation(Deploy) | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
# See: https://github.com/pdm-project/pdm/issues/1879 | |
env: | |
PDM_DEPS: 'urllib3<2' | |
jobs: | |
documentation: | |
name: Deploy documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: pdm-project/setup-pdm@v3 | |
name: Setup PDM | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: pdm install | |
- name: Set up build cache | |
uses: actions/cache@v3 | |
id: cache | |
with: | |
key: mkdocs-material-${{ github.ref }} | |
path: .cache | |
restore-keys: | | |
mkdocs-material- | |
# derived from: | |
# https://github.com/RemoteCloud/public-documentation/blob/dev/.github/workflows/build_docs.yml | |
- name: Configure Git user | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
- name: Depoly documentation | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }} | |
run: | | |
python3 -m ensurepip | |
version=$(python3 -m pip freeze | grep -n "bloqade" | cut -d "=" -f3-) | |
git fetch origin gh-pages --depth=1 | |
pdm run mike deploy --push --update-alias $version latest |