ci: abort deploy docs when a new commit is pushed to main #21
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: Deploy docs | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
docs: | |
# Create latest docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.SGILE_PAT }} | |
submodules: recursive | |
fetch-depth: 0 # fetch all commits/branches | |
- name: Set up Conda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: 3.9 | |
- name: Install libsndfile | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libsndfile1 | |
- name: Install dependencies and package | |
run: | | |
CUDA_TAG=cu117 pip install -r requirements.torch.txt --find-links https://download.pytorch.org/whl/torch_stable.html | |
pip install cython | |
pip install -e . | |
- name: Install documentation dependencies | |
run: | | |
pip install -r docs/requirements.txt | |
- name: Setup doc deploy | |
run: | | |
git config user.name 'github-actions[bot]' | |
git config user.email 'github-actions[bot]@users.noreply.github.com' | |
- name: Deploy docs with mike 🚀 | |
run: | | |
mkdocs build | |
mike deploy --push --update-aliases latest |