Docs deploy to Netlify #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docs deploy to Netlify | |
on: | |
workflow_dispatch: | |
inputs: | |
docsVersion: | |
description: 'Version of the Docs to release. Must be in format: vX eg.: v6 v7 ...' | |
required: true | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
name: Deploy docs | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
- name: Install netlify-cli | |
run: npm install --save-dev [email protected] | |
- name: Install packages. | |
run: npm ci | |
- name: Set up project. | |
run: npm run bootstrap | |
- name: Build docs-app. | |
env: | |
COPY_VERSIONS_JSON: 0 | |
run: npm run build:docs | |
- name: Deploy docs-app to netlify | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
run: npx netlify deploy --alias ${{ github.event.inputs.docsVersion }} --dir ./packages/__docs__/__build__ |