forked from CommitSans/obsidian-gitbook
-
Notifications
You must be signed in to change notification settings - Fork 10
48 lines (41 loc) · 1.12 KB
/
build-gitbook.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
47
48
name: Build GitBook
on:
push:
branches:
- main
workflow_dispatch:
inputs:
repo:
description: 'Repository to use as Obsidian project'
type: string
jobs:
run:
name: Convert Obsidian to GitBook
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Print repo variable
run: echo Repo variable is ${{ github.event.inputs.repo }}
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Clone Obsidian vault
if: github.event.inputs.repo != null
uses: actions/checkout@v2
with:
token: ${{ secrets.DEPLOY_PAT }}
repository: ${{github.event.inputs.repo}}
path: obsidian
- name: Install dependencies
working-directory: ./src
run: npm install
- name: Run the builder
working-directory: ./src
run: npm run build:gitbook
- name: Commit changes
uses: EndBug/add-and-commit@v7
with:
message: '🤖 Build for GitBook'
add: 'gitbook'