Skip to content

add token to doc.yml #3

add token to doc.yml

add token to doc.yml #3

Workflow file for this run

name: doc
on:
push:
branches:
- main
- patch-workflow
# Prevent doc action on `main` from conflicting with others.
concurrency:
group: doc-${{ github.ref }}
cancel-in-progress: true
jobs:
doc:
runs-on: "ubuntu-latest"
timeout-minutes: 30
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Setup mamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: env.yml
environment-name: my_env
cache-environment: true
cache-downloads: true
- name: Install library
run: python -m pip install --no-deps .
- name: Configure git
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Deploy the doc
run: |
echo "Get the latest version of the doc"
git fetch origin gh-pages
echo "Build and deploy the doc on main"
mike deploy --push patch-workflow
env:
github_token: ${{ secrets.PAT }}