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@v31 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- run: | | |
gh repo clone "$GITHUB_REPOSITORY" ~/github.com/"$GITHUB_REPOSITORY" | |
find ~/github.com/"$GITHUB_REPOSITORY" -name default.nix -exec sed -i 's/torch-bin/torchWithoutCuda/' \; -exec sed -i 's/torchvision-bin/torchvision/' \; | |
DEBUG=1 make check all -C ~/github.com/"$GITHUB_REPOSITORY"/shells/python/ | |
DEBUG=1 make check all -C ~/github.com/"$GITHUB_REPOSITORY"/shells/latex/ | |
DEBUG=1 make check all -C ~/github.com/"$GITHUB_REPOSITORY"/shells/html/ | |
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/html/ _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 |