update doc #10
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 Jupyter Book to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'docs/**' | |
- '.github/workflows/deploy-jupyterbook.yml' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'docs/**' | |
- '.github/workflows/deploy-jupyterbook.yml' | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install Dependencies | |
run: | | |
pip install jupyter-book | |
pip install "pfund[data,ml,analytics]" | |
- name: Build Jupyter Book | |
run: | | |
chmod +x ./docs/build.sh | |
bash ./docs/build.sh | |
env: | |
GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }} | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./docs/_build/html | |
deploy: | |
environment: | |
name: github-pages | |
# This will dynamically generate the deployment URL | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Publish to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |