-
Notifications
You must be signed in to change notification settings - Fork 95
43 lines (40 loc) · 1.55 KB
/
publish-documentation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Publish library documentation to gh-pages
# Previously this was a push(master) since it's been updated to be push(tag/1.*) and dispatch_workflow(manual)
name: publish-documentation
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
tags:
- '1.*'
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner on which this job will run
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['16']
# Steps represent a sequence of tasks that will be executed as part of the job
# - Checkout gatsby branch
# - Update authentication for Github Package Registry @kenjdavidson/base16-scss
# - Build gh-pages using action
steps:
- name: Building documentation for ${{ github.ref_name }}
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Authenticate with GitHub package registry
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.ACCESS_TOKEN }}" > ~/.npmrc
- uses: enriikke/[email protected]
with:
access-token: ${{ secrets.ACCESS_TOKEN }}
deploy-branch: gh-pages
working-dir: ./docs
gatsby-args: --prefix-paths