Provisioner cleanup #59
Workflow file for this run
This file contains hidden or 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: Docs | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build-docs: | |
name: Build Documentation | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup conda env | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
miniconda-version: "latest" | |
activate-environment: test | |
python-version: '3.10' | |
auto-activate-base: false | |
- name: Verify conda environment | |
shell: bash -l {0} | |
run: | | |
conda info | |
which python | |
which conda | |
- name: Update pip | |
shell: bash -l {0} | |
run: python -m pip install --upgrade pip | |
- name: Install pytorch | |
shell: bash -l {0} | |
run: python -m pip install torch==2.9.0.dev20250826 --extra-index-url https://download.pytorch.org/whl/nightly/cpu | |
- name: Install monarch | |
shell: bash -l {0} | |
run: python -m pip install monarch-no-torch==0.1.0.dev20250826 --find-links assets/ci | |
- name: Install torchforge | |
shell: bash -l {0} | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: ./scripts/install.sh | |
- name: Install docs dependencies | |
shell: bash -l {0} | |
run: python -m pip install -r docs/requirements.txt | |
- name: Build docs | |
shell: bash -l {0} | |
working-directory: docs | |
run: make html --keep-going SPHINXOPTS='-W' | |
- name: Upload docs artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: docs/build/html/ | |
# doc-preview: | |
# runs-on: [ubuntu-latest] | |
# needs: build-docs | |
# if: ${{ github.event_name == 'pull_request' }} | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v4 | |
# - name: Download artifact | |
# uses: actions/download-artifact@v4 | |
# with: | |
# name: docs | |
# path: docs | |
# - name: Add noindex to preview docs | |
# run: | | |
# echo "Adding noindex meta tag to prevent search engine indexing of preview docs" | |
# find docs -name "*.html" -print0 | xargs -0 sed -i 's/<head>/<head>\n <meta name="robots" content="noindex">/' | |
# - name: Upload docs preview | |
# uses: seemethere/upload-artifact-s3@v5 | |
# if: ${{ github.event_name == 'pull_request' }} | |
# with: | |
# retention-days: 14 | |
# s3-bucket: doc-previews | |
# if-no-files-found: error | |
# path: docs | |
# s3-prefix: meta-pytorch/forge/${{ github.event.pull_request.number }} | |
deploy-docs: | |
needs: build-docs | |
if: github.ref == 'refs/heads/main' | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download build artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: docs | |
path: . | |
- name: Upload Pages artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: . | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |