Skip to content

chore: Generate v0.12.x docs (#1362) #1200

chore: Generate v0.12.x docs (#1362)

chore: Generate v0.12.x docs (#1362) #1200

Workflow file for this run

name: '[Blocking] Generate docs website to GitHub Pages'
on:
push:
branches:
- main
paths:
- '.github/workflows/deploy-docs.yaml'
- 'website/**'
pull_request:
branches:
- main
paths:
- '.github/workflows/deploy-docs.yaml'
- 'website/**'
permissions:
contents: read
jobs:
deploy:
name: Generate docs website to GitHub Pages
runs-on: ubuntu-latest
permissions:
contents: write
defaults:
run:
working-directory: website
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Harden Runner
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a
with:
egress-policy: audit
- name: Setup Node
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: 20.x
- name: Get yarn cache
id: yarn-cache
run: echo "dir=$(yarn cache dir)" > $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-website-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-website-
- run: yarn install --frozen-lockfile
- name: Build Website
run: yarn build
env:
ALGOLIA_ID: ${{ secrets.ALGOLIA_ID }}
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
# deploy only after PR is merged to main
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository == 'project-copacetic/copacetic'
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/build
destination_dir: ./website