forked from graphql-dotnet/graphql-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.16 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
44
45
46
name: Publish documentation
on:
push:
branches:
- master
paths:
- docs2/**
- package.json
- yarn.lock
env:
NODE_VERSION: '10.x' # Node 10 LTS
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: yarn
run: yarn
- name: yarn docs2
working-directory: docs2
run: yarn
- name: yarn gatsby build
working-directory: docs2
run: yarn gatsby build
- name: Publish docs artifacts
uses: actions/upload-artifact@v2
with:
name: Documentation
path: docs2/public/**
if-no-files-found: error
- name: Deploy documentation
uses: seanmiddleditch/gha-publish-to-git@v2
with:
repository: graphql-dotnet/graphql-dotnet.github.io
branch: master
github_token: '${{ secrets.GITHUB_TOKEN }}'
github_pat: '${{ secrets.ORG_PAT_TOKEN }}'
source_folder: docs2/public