-
Notifications
You must be signed in to change notification settings - Fork 112
38 lines (37 loc) · 1.06 KB
/
release.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
name: Publish VaultAPI to GitHub Packages
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
uses: actions/checkout@v2
- name: Checkout gh-pages branch
uses: actions/checkout@v2
with:
ref: gh-pages
path: gh-pages
- uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build and publish package
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
mvn -B javadoc:javadoc
# mvn -B deploy
- name: Commit javadocs
run: |
cp -Rfv target/javadoc-latest/* gh-pages/
cd gh-pages
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -m "Update javadoc pages for latest release" -a
- name: Push javadoc changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ github.token }}