theta-client update documents on release #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: theta-client update documents on release | |
on: | |
release: | |
types: [released] | |
jobs: | |
update_kdoc: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout main | |
uses: actions/checkout@v3 | |
with: | |
path: main | |
ref: ${{ github.event.release.tag_name }} | |
- name: Checkout gh-pages | |
uses: actions/checkout@v3 | |
with: | |
path: gh-pages | |
ref: gh-pages | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
- name: Setup for build | |
run: | | |
rm -rf ${{ github.workspace }}/gh-pages/docs | |
if [ -e ${{ github.workspace }}/gh-pages/version/${{ github.event.release.name }} ]; then | |
rm -rf ${{ github.workspace }}/gh-pages/version/${{ github.event.release.name }} | |
fi | |
- name: Build | |
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 | |
with: | |
arguments: dokkaHtml -Pversion=${{ github.event.release.name }} -Pworkspace=${{ github.workspace }} | |
build-root-directory: ${{ github.workspace }}/main | |
- name: Push to GitHub pages | |
run: | | |
cd ${{ github.workspace }}/gh-pages | |
git config --local user.email github-actions | |
git config --local user.name [email protected] | |
git add . | |
git commit -m "Release version ${{ github.event.release.name }}" | |
git push origin gh-pages |