Skip to content

Update translations #1747

Update translations

Update translations #1747

Workflow file for this run

name: User's Guide
on:
push: # Build the docs for any branch (we only push to GCP when building from main)
pull_request: # Build the docs for any PR
create: # Any time a tag (or branch) is added, rebuild the docs.
jobs:
build-ug:
name: Sphinx docs
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v1
- name: Set up python
uses: actions/setup-python@v1
with:
python-version: "3.10"
- name: Setup with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
environment-name: env
condarc: |
channels:
- conda-forge
- name: Run custom extension tests
run: make test_investspec
- name: Build sphinx docs
run: make html
- name: Build redirects
run: make redirect
- name: Check links
# this has rarely run for hours for no apparent reason
timeout-minutes: 2
continue-on-error: true
run: make linkcheck
- name: Authenticate GCP
if: github.event_name != 'pull_request'
uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACC_KEY }}
- name: Set up GCP
if: github.event_name != 'pull_request'
uses: google-github-actions/setup-gcloud@v0
- name: Upload to release bucket
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }}
run: |
BUCKET=gs://releases.naturalcapitalproject.org/invest-userguide/latest
gsutil -m rsync -dr build/html $BUCKET
# Cache appears to be reset each time we upload a new blob.
# Re-set the cache here to allow UG editors to immediately view
# changes to the rendered HTML.
gsutil -m setmeta -r -h "Cache-control:no-store" $BUCKET
- name: Upload to dev builds bucket
if: ${{ github.event_name != 'pull_request' && github.ref != 'refs/heads/main' }}
run: |
FORKUSER=$(basename $(dirname $(git remote get-url origin)))
BUCKET=gs://natcap-dev-build-artifacts/invest-userguide/$FORKUSER/latest
gsutil -m rsync -dr build/html $BUCKET
# Cache appears to be reset each time we upload a new blob.
# Re-set the cache here to allow UG editors to immediately view
# changes to the rendered HTML.
gsutil -m setmeta -r -h "Cache-control:no-store" $BUCKET
- name: Save UG artifacts
uses: actions/upload-artifact@v1
with:
name: InVEST User's Guide
path: build/html