Skip to content

small Indicator update; new usage example #7

small Indicator update; new usage example

small Indicator update; new usage example #7

Workflow file for this run

name: Docs
on:
push:
branches:
- main
paths:
- docs/**
- .github/workflows/docs.yml
pull_request:
paths:
- docs/**
- .github/workflows/docs.yml
workflow_dispatch:
concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build docs
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: docs/package-lock.json
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Configure AWS credentials
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Deploy to S3
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: aws s3 sync dist/ s3://runmercury.com/ --delete
- name: Invalidate CloudFront
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: aws cloudfront create-invalidation --distribution-id "${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}" --paths "/*"