diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml new file mode 100644 index 0000000..0eb2b4a --- /dev/null +++ b/.github/workflows/documentation.yaml @@ -0,0 +1,42 @@ +name: Documentation + +on: + push: + branches: + - main + workflow_dispatch: + +env: + EARTHENGINE_SERVICE_ACCOUNT: ${{ secrets.EARTHENGINE_SERVICE_ACCOUNT }} + EARTHENGINE_PROJECT: ${{ secrets.EARTHENGINE_PROJECT }} + +jobs: + docs: + needs: [lint] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: 12rambau/setup-pandoc@test + - uses: actions/setup-python@v5 + with: + python-version: "3.10" + - name: Install nox + run: pip install nox + - name: build static docs + run: nox -s docs + - name: Upload static files as artifact + id: deployment + uses: actions/upload-pages-artifact@v3 + with: + path: docs/_build/html/ + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4