Skip to content

Refresh the action cache once a month (#362) #52

Refresh the action cache once a month (#362)

Refresh the action cache once a month (#362) #52

Workflow file for this run

name: Deploy Documentation
on:
push:
branches:
- main
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
docs-deploy:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: torch27
python-version: 3.12
channels: defaults,pytorch,conda-forge
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.conda/pkgs
~/.cache/pip
key: ${{ runner.os }}-docs-${{ hashFiles('.github/workflows/docs-deploy.yml') }}
restore-keys: |
${{ runner.os }}-docs-
- name: Install project with docs dependencies
run: |
pip install -e ".[docs]"
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Build documentation
run: |
cd docs/
make html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4