CIDM-Foundation-A1-R1-R2-FIX1-Results / sources /neuraloperator /.github /workflows /build_doc_dev.yml
Download sources/neuraloperator/.github/workflows/build_doc_dev.yml from wuff-mann/CIDM-Foundation-A1-R1-R2-FIX1-Results: direct link, hf CLI and curl.
- Browser
- Download file 2.22 kB
-
https://huggingface.co/datasets/wuff-mann/CIDM-Foundation-A1-R1-R2-FIX1-Results/resolve/main/sources/neuraloperator/.github/workflows/build_doc_dev.yml
- Command line
-
hf download hf://datasets/wuff-mann/CIDM-Foundation-A1-R1-R2-FIX1-Results/sources/neuraloperator/.github/workflows/build_doc_dev.yml
-
curl -L -o build_doc_dev.yml https://huggingface.co/datasets/wuff-mann/CIDM-Foundation-A1-R1-R2-FIX1-Results/resolve/main/sources/neuraloperator/.github/workflows/build_doc_dev.yml
2.22 kB
| name: Build documentation | |
| # Action adapted from https://github.com/tensorly/tensorly | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Install Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.13 | |
| # - name: Install TensorLy and TensorLy-Torch dev | |
| # run: | | |
| # CWD=`pwd` | |
| # echo 'Cloning repos in ${CWD}' | |
| # mkdir git_repos | |
| # cd git_repos | |
| # git clone https://github.com/tensorly/tensorly | |
| # cd tensorly | |
| # python -m pip install -e . | |
| # cd .. | |
| # git clone https://github.com/tensorly/torch | |
| # cd torch | |
| # python -m pip install -e . | |
| # cd ../.. | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install setuptools | |
| python -m pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu | |
| - name: Install package | |
| run: | | |
| python -m pip install -e .[all] | |
| - name: Make doc | |
| run: | | |
| cd doc | |
| make html | |
| cd .. | |
| - name: Push docs on main update | |
| if: success() && github.ref == 'refs/heads/main' | |
| run: | | |
| # Add deploy key and clone through ssh | |
| eval "$(ssh-agent -s)" | |
| mkdir ~/.ssh | |
| echo "${{ secrets.DOC_DEPLOY_PRIVATE_KEY }}" > ~/.ssh/id_rsa | |
| chmod 600 ~/.ssh/id_rsa | |
| ssh-keyscan -t rsa github.com | |
| echo 'Documentation was successfully built, updating the website.' | |
| # See https://github.community/t/github-actions-bot-email-address/17204/5 | |
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git config --global user.name "github-actions" | |
| git clone "git@github.com:neuraloperator/neuraloperator.github.io.git" doc_folder | |
| echo "-- Updating the content" | |
| cd doc_folder | |
| git rm -r dev/* | |
| mkdir -p dev | |
| echo "Copying to folder" | |
| cp -r ../doc/build/html/* dev/ | |
| echo "Pushing to git" | |
| git add dev | |
| git commit -m "Github action: auto-update." | |
| git push --force origin main | |