Skip to content

Commit

Permalink
chore: create publish-docs.yml (#3298)
Browse files Browse the repository at this point in the history
Co-authored-by: Tom French <tom@tomfren.ch>
  • Loading branch information
signorecello and TomAFrench authored Oct 26, 2023
1 parent 8d9b738 commit b45f3a1
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish Docs

on:
workflow_dispatch:
inputs:
tag:
description: The tag to build Docs for
required: false

jobs:
publish-docs:
runs-on: ubuntu-latest
if: ${{ inputs.tag != '' }}
permissions:
pull-requests: write
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Install Yarn dependencies
uses: ./.github/actions/setup

- name: Cut a new version
working-directory: ./docs
run: yarn docusaurus docs:version ${{ inputs.tag }}

- name: Build docs
run: yarn workspace docs build

- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v2.1
with:
publish-dir: './docs/build'
production-branch: master
production-deploy: false # TODO change to true
github-token: ${{ secrets.GITHUB_TOKEN }}
enable-github-deployment: false
deploy-message: "Deploy from GitHub Actions for tag ${{ inputs.tag }}"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1

0 comments on commit b45f3a1

Please sign in to comment.