Merge pull request #99 from Zijun9297/main #1
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: Generate Index JSON | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'data/**' | |
jobs: | |
generate-index: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
java-version: 11 | |
- name: Build with Gradle | |
run: ./gradlew generateIndexJson | |
- name: Copy index.json | |
run: cp index.json ${{ github.workspace }}/index.json | |
- name: Copy index.map.json | |
run: cp index.map.json ${{ github.workspace }}/index.map.json | |
- name: Commit changes | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Update index.json and index.map.json | |
commit_user_name: GitHub Actions | |
commit_user_email: [email protected] | |
commit_author: GitHub Actions <[email protected]> | |
file_pattern: "index.json,index.map.json" |