-
Notifications
You must be signed in to change notification settings - Fork 805
58 lines (48 loc) · 1.65 KB
/
docs_master.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
name: Generate and Publish Docs
on:
push:
branches:
- master
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false
jobs:
generate-docs:
# Only run the root repository
if: startsWith(github.repository, 'spinnaker/')
runs-on: ubuntu-latest
steps:
- name: Checkout service repo
uses: actions/checkout@v4
with:
path: service
- name: Checkout docs repo
uses: actions/checkout@v4
with:
repository: spinnaker/spinnaker.io
path: docs
- uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'zulu'
cache: 'gradle'
- name: Generate docs
run: ./gradlew dokkaHtml --stacktrace
working-directory: ./service
- name: Copy docs
run: |
SOURCE_DIR=service/orca-api/build/dokka/html/
TARGET_DIR=content/en/docs/reference/api/service-plugin-apis/orca-api/master/
mkdir -p $TARGET_DIR
cp -R $SOURCE_DIR $TARGET_DIR
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
path: ./docs
title: 'docs(javadocs): Updating autogenerated javadocs'
body: |
Automated changes by `${{ github.workflow }}` in `${{ github.repository }}` ([Run ${{ github.run_id }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})).
token: ${{ secrets.SPINNAKER_GITHUB_TOKEN }}
- name: Output PR Info
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"