Merge pull request #105 from bmad-sim/ChristopherMayes-patch-1 #319
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: Publish Documentation | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: "0 0 * * *" # every day at midnight | |
jobs: | |
deploy: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [3.12] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/conda-setup | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: ./.github/actions/bmad-setup | |
- name: List mamba | |
shell: bash -l {0} | |
run: | | |
mamba list | |
- name: Execute notebooks | |
shell: bash -l {0} | |
run: | | |
bash scripts/execute_notebooks.bash | |
- name: Build Docs | |
shell: bash -l {0} | |
run: | | |
mkdocs build | |
zip -r pytao-examples.zip docs/examples/ | |
mv pytao-examples.zip ./site/assets/ | |
- name: Deploy to gh-pages | |
if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags') }} | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./site/ |