-
Notifications
You must be signed in to change notification settings - Fork 6
48 lines (40 loc) · 1.11 KB
/
pushdocs.yml
File metadata and controls
48 lines (40 loc) · 1.11 KB
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
47
48
name: Push documentation to github pages repo
env:
GH_PAGES_TOKEN: ${{ secrets.GH_PAGES_TOKEN }}
# Trigger the workflow on push to main or when a github release is created
on:
push:
branches:
- main
tags:
- '**'
release:
types: [created]
jobs:
pushdocs:
name: Push SDK documentation
runs-on: ubuntu-latest
steps:
- name: Checkout sdk monorepo
uses: actions/checkout@v2
with:
path: monorepo
- name: Checkout github docs repo
uses: actions/checkout@v2
with:
repository: ibm-verify/ibm-verify.github.io
path: docs
- name: Install npm
uses: actions/setup-node@v2
with:
node-version: '12'
- name: Authorize GitHub CLI
env:
GH_PAGES_TOKEN: ${{ secrets.GH_PAGES_API_TOKEN }}
run: |
env -u GH_PAGES_TOKEN gh auth login --with-token <<< "$GH_PAGES_TOKEN"
- name: Push docs
env:
GH_PAGES_TOKEN: ${{ secrets.GH_PAGES_API_TOKEN }}
run: ${{ github.workspace }}/monorepo/.github/scripts/pushdocs.sh
shell: bash