Skip to content

Merge pull request #108 from jonelantha/linkHref-callback #106

Merge pull request #108 from jonelantha/linkHref-callback

Merge pull request #108 from jonelantha/linkHref-callback #106

Workflow file for this run

name: Deploy Docs
on:
push:
branches: [main, docs-live, docs-beta]
workflow_dispatch:
inputs:
docsEnv:
description: 'Docs Environment'
required: true
default: 'dev'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build component
run: npm run build
- name: Build docs
run: npm run build-docs
- name: Configure AWS Credentials
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: eu-west-2
- name: Deploy Dev
uses: jonelantha/gatsby-s3-action@v3
if: ${{ (github.event.inputs.docsEnv == 'dev' || github.ref == 'refs/heads/docs-beta') && success() }}
with:
dest-s3-bucket: ${{ secrets.DOCS_DEV_BUCKET }}
cloudfront-id-to-invalidate: ${{ secrets.DOCS_DEV_CLOUDFRONT }}
public-source-path: ./packages/docs/public
- name: Deploy Live
uses: jonelantha/gatsby-s3-action@v3
if: ${{ (github.event.inputs.docsEnv == 'live' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/docs-live') && success() }}
with:
dest-s3-bucket: ${{ secrets.DOCS_LIVE_BUCKET }}
cloudfront-id-to-invalidate: ${{ secrets.DOCS_LIVE_CLOUDFRONT }}
public-source-path: ./packages/docs/public