Merge pull request #200 from seismic-anisotropy/add-update-multiphase #522
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: GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Build | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y python3-pip | |
python3 -m pip install --upgrade pip | |
python3 -m venv .venv-gh-pages | |
source .venv-gh-pages/bin/activate | |
python3 -m pip install "$PWD"[doc,test] | |
pdoc -t docs/template -o html --math pydrex !pydrex.mesh !pydrex.distributed tests | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
# If you're changing the branch from main, | |
# also change the `main` in `refs/heads/main` | |
# below accordingly. | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./html |