-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (54 loc) · 1.65 KB
/
docs.yml
File metadata and controls
58 lines (54 loc) · 1.65 KB
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
name: Docs
concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: true
permissions:
# contents permission to update benchmark contents in gh-pages branch
contents: write
on:
workflow_dispatch:
push:
branches: [ main ]
tags:
- 'v*'
jobs:
docs:
name: build and push static docs
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
java: [17]
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Setup java
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
cache: 'gradle'
distribution: 'temurin'
- name: "Git Fetch & Checkout"
run: |
git config --local user.email "team@fluvio.io"
git config --local user.name "Fluvio Authors"
git fetch --all
git checkout -b docs --track origin/docs
git merge -X theirs origin/main -m "Merge remote-tracking branch 'origin/main into docs" --allow-unrelated-histories
- name: Build docs
run: |
make docs
rm -rf docs
cp -r fluvio/build/docs/javadoc docs
touch docs/.nojekyll
- name: Commit files
run: |
git add --force docs
git commit -m "Updated Fluvio Node.js client docs" -a || true
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: docs