Skip to content

Publish Website

Publish Website #651

Workflow file for this run

name: Publish Website
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build_docs_job:
runs-on: ubuntu-latest
steps:
# 1) Check out the repository
- name: Checkout
uses: actions/checkout@v4
# 2) Build Docusaurus site with C++ docs (using Doxygen)
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
cache-dependency-path: ./momentum/website/yarn.lock
- name: Install Doxygen
run: sudo apt-get install doxygen
- name: Build the Website
working-directory: momentum/website
run: |
yarn install --frozen-lockfile
yarn run build
# 3) Build Python API docs
- name: Install CUDA Toolkit
uses: Jimver/[email protected]
id: cuda-toolkit
with:
# Available versions: https://github.com/Jimver/cuda-toolkit/blob/v0.2.18/src/links/linux-links.ts
cuda: "12.8.0"
- name: Check CUDA Version
run: |
nvcc --version
- name: Set Conda environment variables
run: |
echo "CONDA_OVERRIDE_CUDA=$(echo $FULL_CUDA_VERSION | cut -d'.' -f1)" >> $GITHUB_ENV
- name: Build Python API Documentation
run: |
MOMENTUM_BUILD_IO_FBX=ON \
pixi run -e gpu doc_py
# 4) Copy Python API Documentation to Docusaurus
- name: Copy Python API Documentation
run: |
cp -R build/python_api_doc momentum/website/build/python_api_doc
# 5) Deploy Docusaurus folder to GitHub Pages
- name: Deploy to GiHub Pages
if: ${{ github.event_name == 'push' }}
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: momentum/website/build