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
on: [push, pull_request] | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
jobs: | |
develop: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: cachix/install-nix-action@v27 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- run: | | |
gh repo clone "$GITHUB_REPOSITORY" ~/github.com/"$GITHUB_REPOSITORY" | |
cd ~/github.com/"$GITHUB_REPOSITORY" | |
nix flake check | |
nix fmt | |
find . -name default.nix -exec sed -i 's/torch-bin/torchWithoutCuda/' \; -exec sed -i 's/torchvision-bin/torchvision/' \; | |
bash packages/python/run-tests.sh | |
env: | |
GH_TOKEN: ${{ github.token }} | |
build-github-page: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build static files | |
id: build | |
run: | | |
cp -r shells/docs/ _site/ | |
- name: Upload static files as artifact | |
id: deployment | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: _site/ | |
deploy-github-page: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build-github-page | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |