Merge branch 'main' of https://github.com/openradar/asean2024-pyrad-c… #12
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: deploy-book | |
on: | |
# Trigger the workflow on push to main branch | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
uses: ./.github/workflows/build-book.yaml | |
with: | |
environment_name: asean2024-pyrad-course | |
environment_file: environment.yml | |
path_to_notebooks: ./ | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Download Artifact Book | |
uses: actions/download-artifact@v3 | |
with: | |
name: book-zip-${{ github.event.number }} | |
- name: Unzip the book | |
run: | | |
rm -rf _build/html | |
unzip book.zip | |
rm -f book.zip | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/[email protected] | |
if: github.ref == 'refs/heads/main' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: _build/html | |
keep_files: true # This preserves existing previews from open PRs |