Skip to content

chore(deps): update node.js to v20.12.2 #137

chore(deps): update node.js to v20.12.2

chore(deps): update node.js to v20.12.2 #137

Workflow file for this run

name: Docs
on:
push:
branches:
- main
paths:
- docs/**
pull_request:
branches:
- main
paths:
- docs/**
jobs:
docs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: '20.9'
cache: npm
cache-dependency-path: docs/package-lock.json
- name: Install dependencies
run: npm ci
- name: Build docs
run: npm run build
- uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4
if: github.ref == 'refs/heads/main'
with:
aws-access-key-id: ${{ secrets.DOCS_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1
- name: Deploy
if: github.ref == 'refs/heads/main'
run: >-
aws s3 sync build s3://glasskube/docs/
--cache-control "max-age=60, public"
--acl=public-read
- name: Invalidate cache
if: github.ref == 'refs/heads/main'
run: >-
aws cloudfront create-invalidation
--distribution-id E255221I2BC85
--invalidation-batch "Paths={Quantity='1' ,Items=['/docs/*']},CallerReference=DOCS_$GITHUB_RUN_ID"