diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml new file mode 100644 index 00000000..4ce84a38 --- /dev/null +++ b/.github/workflows/deploy-pages.yml @@ -0,0 +1,68 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy documentation to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["develop"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +env: + POETRY_VERSION: "1.3.1" + PYTHON_VERSION: "3.10" + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - uses: getsentry/action-github-app-token@v2 + name: podaac cicd token + id: podaac-cicd + with: + app_id: ${{ secrets.CICD_APP_ID }} + private_key: ${{ secrets.CICD_APP_PRIVATE_KEY }} + - uses: actions/checkout@v3 + with: + repository: ${{ github.repository }} + token: ${{ steps.podaac-cicd.outputs.token }} + - uses: actions/setup-python@v4 + with: + python-version: ${{ env.PYTHON_VERSION }} + - name: Install Poetry + uses: abatilo/actions-poetry@v2 + with: + poetry-version: ${{ env.POETRY_VERSION }} + + # Build the book + - name: Build the book + run: | + poetry lock --no-update + poetry run jupyter-book build docs/ + + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + # Upload only docs repository + path: 'docs/_build/html' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/docs/_config.yml b/docs/_config.yml index 9441ddc2..5e187eca 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -21,9 +21,8 @@ bibtex_bibfiles: # Information about where the book exists on the web repository: - url: https://github.com/executablebooks/jupyter-book # Online location of your book + url: https://github.com/podaac/hydrocron # Online location of your book path_to_book: docs # Optional path to your book, relative to the repository root - branch: master # Which branch of the repository should be used when creating links (optional) # Add GitHub buttons to your book # See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 7e821e45..00000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -jupyter-book -matplotlib -numpy