-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: create publish-docs.yml (#3298)
Co-authored-by: Tom French <tom@tomfren.ch>
- Loading branch information
1 parent
8d9b738
commit b45f3a1
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
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
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 |