Skip to content

add(vulnerabilities): assets #2551

add(vulnerabilities): assets

add(vulnerabilities): assets #2551

Workflow file for this run

name: Build and publish doc
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # required for git date plugin
- name: Create cached folder
uses: actions/cache@v4
with:
path: out
key: ${{ github.sha }}
- name: Install poetry
run: pipx install poetry
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
architecture: x64
cache: poetry
- name: Install all dependencies
run: |
poetry install \
--no-dev \
--no-interaction \
--ansi \
--remove-untracked
- name: Build documentation
run: |
./build.sh nav ssb ci-nais dev-nais tenant
publish:
if: github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
tenant:
- name: ci-nais
bucket: doc.ci-nais.cloud.nais.io
- name: dev-nais
bucket: doc.dev-nais.cloud.nais.io
- name: nav
bucket: doc.nav.cloud.nais.io
- name: nav
bucket: docs.nais.io
- name: ssb
bucket: doc.ssb.cloud.nais.io
steps:
- name: Restore cache folder
uses: actions/cache/restore@v4
with:
path: out
key: ${{ github.sha }}
- name: Sync documentation to bucket
uses: actions-hub/[email protected]
env:
PROJECT_ID: not-used
APPLICATION_CREDENTIALS: ${{ secrets.NAIS_DOC_SA }}
with:
args: -m rsync -r -c -d out/${{matrix.tenant.name}}/ gs://${{ matrix.tenant.bucket }}
cli: gsutil
- name: Invalidate cache
uses: actions-hub/[email protected]
env:
PROJECT_ID: not-used
APPLICATION_CREDENTIALS: ${{ secrets.NAIS_DOC_SA }}
with:
args: -m setmeta -r -h 'Cache-Control:public, max-age=180' 'gs://${{ matrix.tenant.bucket }}/*'
cli: gsutil