Skip to content

docs(Add local oracle db setup to docs) #2272

docs(Add local oracle db setup to docs)

docs(Add local oracle db setup to docs) #2272

Workflow file for this run

name: Build and publish docs
on:
push:
branches:
- main
paths:
- 'docs/**'
pull_request:
paths:
- 'docs/**'
workflow_dispatch:
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v1
with:
python-version: 3.9
- run: pip install -r docs/requirements.txt
- uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
- name: Build jupyter book
run: jb build docs --warningiserror --keep-going # set doc to fail on any sphinx warning
- uses: actions/upload-artifact@v2
if: always()
with:
name: docs-build
path: docs/_build/html
# Production
- name: Deploy docs to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
publish_branch: gh-pages
# Preview on PRs
- name: Deploy docs preview to Netlify
if: ${{ github.ref != 'refs/heads/main' }}
run: |
npm install -g netlify-cli
netlify deploy --dir=docs/_build/html --alias=docs-${GITHUB_REPOSITORY#*/}-${PR_NUMBER}
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
- uses: peter-evans/find-comment@v2
if: ${{ github.event_name == 'pull_request' }}
id: fc
with:
issue-number: ${{ github.event.number }}
comment-author: 'github-actions[bot]'
body-includes: --cal-itp-previews.netlify.app
- uses: peter-evans/create-or-update-comment@v2
if: ${{ github.event_name == 'pull_request' }}
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.number }}
body: "Preview url: https://docs-${{github.event.repository.name}}-${{ github.event.number }}--cal-itp-previews.netlify.app"
edit-mode: replace