forked from OpenLineage/OpenLineage
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (41 loc) · 1.42 KB
/
docs-deploy.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
name: Build & Deploy javadoc
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
branches:
# testing only, not allowed to run on OpenLineage/OpenLineage repo
- test-docs-deploy
jobs:
generate_javadoc:
if: |
(github.event.base_ref == 'test-docs-deploy' && github.repository != 'OpenLineage/OpenLineage' ) ||
(github.event.base_ref != 'test-docs-deploy' && github.repository == 'OpenLineage/OpenLineage)
name: "Generate Java docs"
steps:
- uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '11'
- name: Clear existing javadoc
run: rm -rf website/static/apidocs/javadoc
- name: Generate new java doc
run: |
cd client/java
./gradlew --console=plain javadoc
- name: Copy docs to website directory
run: cp client/java/build/docs/javadoc website/static/apidocs
- name: Commit javadoc to main
run: |
git config user.name github-actions
git config user.email [email protected]
git fetch
git checkout main
git add website/static/apidocs/*
git commit -m "[generated] reloading javadoc"
git push
netlify-deploy-changes:
uses: ./.github/workflows/netlify-deploy.yml
secrets:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_TOKEN_SECRET: ${{ secrets.NETLIFY_TOKEN_SECRET }}