Build and Deploy Sphinx Docs #16
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: Build and Deploy Sphinx Docs | |
on: | |
push: | |
branches: | |
- main # Change this to the branch you want to trigger the action on | |
- hg-docs | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' # Use the Python version you need | |
- name: Install dependencies | |
run: | | |
git fetch | |
git checkout hg-docs | |
python -m pip install --upgrade pip | |
sudo apt install libsndfile1 | |
pip install datasets evaluate transformers | |
pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cpu | |
pip install fairseq2n --pre --upgrade --extra-index-url https://fair.pkg.atmeta.com/fairseq2/whl/nightly/pt2.3.1/cpu | |
pip install -e . | |
cd doc | |
pip install -r requirements.txt | |
- name: Build the documentation | |
run: | | |
cd doc # Change this if your documentation is in a different directory | |
make html # Adjust if you use a different build command | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./doc/build/html # Adjust if your build output is in a different directory |