-
Notifications
You must be signed in to change notification settings - Fork 14
67 lines (55 loc) · 1.67 KB
/
build_doc.yaml
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
name: Connector - Build Doc
on:
push:
# Pattern matched against v<MAJOR>.<MINOR>.<PATCH>
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
branches:
- 'master'
- 'release/connector/*'
- 'support/connector/*'
pull_request:
branches:
- 'master'
- 'release/connector/*'
- 'support/connector/*'
jobs:
test:
runs-on: ubuntu-latest
name: Build doc
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '18.7'
- uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install jsdoc
run: npm install -g jsdoc
- name: Install Python Dependencies
run: pip install -r docs/requirements.txt
- name: Build HTML
run: make html -C docs
- name: Archive HTML documentation
uses: actions/upload-artifact@v3
with:
name: HTML doc
path: docs/_build/html
- name: Getting version from tag
id: vars
if: startsWith(github.ref, 'refs/tags/v')
run: echo "tag=${GITHUB_REF#refs/*/v}" >> $GITHUB_OUTPUT
- name: Publish HTML documentation
if: startsWith(github.ref, 'refs/tags/v')
uses: shallwefootball/s3-upload-action@master
with:
aws_key_id: ${{ secrets.AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
aws_bucket: ${{ secrets.AWS_BUCKET }}
source_dir: 'docs/_build/html/'
destination_dir: "documentation/connector/${{ steps.vars.outputs.tag }}/api/javascript/"