-
Notifications
You must be signed in to change notification settings - Fork 10
72 lines (61 loc) · 1.73 KB
/
doc-build.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Build Contrib API Docs
on:
workflow_call:
inputs:
project:
description: "Source Github repo to build docs for"
required: true
default: "clojure/data.fressian"
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: 8
distribution: 'temurin'
- name: Set up Clojure
uses: DeLaGuardo/[email protected]
with:
cli: 'latest'
- name: Cache clojure dependencies
uses: actions/cache@v4
with:
path: |
~/.m2/repository
~/.gitlibs
key: cljdeps-${{ hashFiles('deps.edn') }}
restore-keys: cljdeps-
- name: Clone contrib api repo
uses: actions/checkout@v4
with:
repository: clojure/contrib-api-doc
path: contrib-api-doc
fetch-depth: 0
- name: Clone repo to doc
uses: actions/checkout@v4
with:
repository: ${{ inputs.project }}
path: contrib-api-doc/repo
fetch-depth: 0
- name: Clone repo to doc gh-pages branch
uses: actions/checkout@v4
with:
repository: ${{ inputs.project }}
path: contrib-repo
ref: 'gh-pages'
fetch-depth: 0
- name: Call contrib-api-doc build.sh
run: |
bash ./contrib-api-doc/build.sh ${{ inputs.project }}
- name: Commit and push gh-pages branch
run: |
cd contrib-repo
cp -r ../contrib-api-doc/repo-docs/* .
git config --global user.name clojure-build
git config --global user.email "[email protected]"
git add -u -v
git commit -m "Autodoc commit"
git push origin gh-pages