-
Notifications
You must be signed in to change notification settings - Fork 21
42 lines (37 loc) · 1.24 KB
/
docs.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
name: Build and Publish Docs
on:
release:
types: [released, prereleased]
# Remove me: Going rapid fire today on full docs improvement, running each time.
push:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Checkout
uses: actions/checkout@v3
with:
repository: 'Mintbase/gitbook-docs'
ref: 'include-api-docs'
path: 'docs/gitbook-docs'
token: ${{ secrets.GITHUB_TOKEN }}
ssh-key: ${{ secrets.TEAM_ACCOUNT_KEY }}
persist-credentials: true
- name: Copy and Publish Docs
working-directory: 'docs/gitbook-docs'
env:
github-token: ${{ secrets.GITHUB_TOKEN }}
run: |
rm -rf mintbase-sdk-ref/
node ../migrate.js
git config --global user.name "mintbaseteam"
git config --global user.email "eng@mintbase.io"
git add --all
git diff-index --quiet HEAD ||commit -m "📒 🤖 ${{ github.event.head_commit.message || github.event.release.tag_name }} docs sync"
git push origin HEAD