CI #83
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
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created | |
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path | |
name: CI | |
on: | |
#schedule: | |
# * is a special character in YAML so you have to quote this string | |
#- cron: '0 9 * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '8' | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
- name: Run Java Application | |
run: java -jar target/tools-in-ruanyf-weekly-jar-with-dependencies.jar | |
- name: Commit files | |
run: | | |
git config --local user.email "luoyukongchan@outlook.com" | |
git config --local user.name "LiLittleCat" | |
git pull | |
git diff --quiet && git diff --staged --quiet || (git add . && git commit -m "Update contents") | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.MY_GIT_TOKEN }} | |
branch: master | |
- name: Deploy to GitHub Pages | |
run: | | |
pip install mkdocs-material | |
mkdocs gh-deploy --force |