VaultAPI/.github/workflows/release.yml
2020-08-02 13:54:10 -07:00

38 lines
1.1 KiB
YAML

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: ${{ secrets.GITHUB_TOKEN }}
run: |
mvn -B javadoc:javadoc deploy
- name: Commit javadocs
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
cp -Rfv target/javadoc-latest/* gh-pages/
cd gh-pages
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: ${{ secrets.GITHUB_TOKEN }}