Skip to content

Commit b6af313

Browse files
authored
Merge pull request #669 from hkad98/documentation
2 parents 05714df + e162cdb commit b6af313

File tree

2 files changed

+43
-36
lines changed

2 files changed

+43
-36
lines changed

.github/actions/hugo-build-action/action.yaml

+22-21
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,25 @@ inputs:
88
runs:
99
using: "composite"
1010
steps:
11-
- name: "Setup GO"
12-
uses: actions/setup-go@v4
13-
with:
14-
go-version: '>=1.20.1'
15-
- name: "Setup Node"
16-
uses: actions/setup-node@v3
17-
with:
18-
node-version: 18
19-
- name: "Setup Hugo"
20-
uses: peaceiris/actions-hugo@v3
21-
with:
22-
extended: true
23-
hugo-version: '0.110.0'
24-
- name: "Build"
25-
env:
26-
BASE_URL: ${{ inputs.base-url }}
27-
shell: bash
28-
run: |
29-
cd docs
30-
npm install
31-
hugo --minify ${BASE_URL:+--baseURL $BASE_URL} -e _default
11+
- name: "Setup GO"
12+
uses: actions/setup-go@v5
13+
with:
14+
go-version: '>=1.20.1'
15+
- name: "Setup Node"
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
cache: 'npm'
20+
cache-dependency-path: docs/package-lock.json
21+
- name: "Install Dependencies"
22+
shell: bash
23+
working-directory: ./docs
24+
run: |
25+
npm ci
26+
- name: "Build documentation"
27+
working-directory: ./docs
28+
env:
29+
BASE_URL: ${{ inputs.base-url }}
30+
shell: bash
31+
run: |
32+
hugo --minify ${BASE_URL:+--baseURL $BASE_URL} -e _default

.github/actions/hugo-build-versioned-action/action.yaml

+21-15
Original file line numberDiff line numberDiff line change
@@ -32,28 +32,34 @@ runs:
3232
run: |
3333
python -m pip install --upgrade pip
3434
pip install -r scripts/script-requirements.txt
35-
- uses: actions/setup-go@v4
35+
- uses: actions/setup-go@v5
3636
with:
3737
go-version: '>=1.20.1'
38-
- uses: actions/setup-node@v3
38+
- name: "Setup Node"
39+
uses: actions/setup-node@v4
3940
with:
40-
node-version: 18
41-
- name: "Setup Hugo"
42-
uses: peaceiris/actions-hugo@v3
43-
with:
44-
extended: true
45-
hugo-version: '0.110.0'
46-
- name: "Build"
47-
env:
48-
THIS_BRANCH: ${{ inputs.this-branch }}
49-
BASE_URL: ${{ inputs.base-url }}
50-
HUGO_ENV: ${{ inputs.hugo-env }}
41+
node-version: 20
42+
cache: 'npm'
43+
cache-dependency-path: docs/package-lock.json
44+
- name: "Install Dependencies"
45+
working-directory: ./docs
46+
shell: bash
47+
run: |
48+
npm ci
49+
- name: "Generate version docs"
50+
working-directory: ./docs
5151
shell: bash
5252
run: |
53-
cd docs
5453
rm -f generate.sh
5554
wget https://raw.githubusercontent.com/gooddata/gooddata-python-sdk/master/scripts/generate.sh
5655
chmod +x ./generate.sh
5756
./generate.sh ${{ inputs.fetch-from }} master
58-
npm install
57+
- name: "Build documentation"
58+
working-directory: ./docs
59+
env:
60+
THIS_BRANCH: ${{ inputs.this-branch }}
61+
BASE_URL: ${{ inputs.base-url }}
62+
HUGO_ENV: ${{ inputs.hugo-env }}
63+
shell: bash
64+
run: |
5965
hugo --minify ${BASE_URL:+--baseURL $BASE_URL}

0 commit comments

Comments
 (0)