Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: create publish-docs.yml #3298

Merged
merged 4 commits into from
Oct 26, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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 dependencies
run: yarn

- name: Cut a new version
run: cd docs && yarn docusaurus docs:version ${{ inputs.tag }}
TomAFrench marked this conversation as resolved.
Show resolved Hide resolved

- 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
TomAFrench marked this conversation as resolved.
Show resolved Hide resolved
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