diff --git a/.github/workflows/run_cafe_sync.yml b/.github/workflows/run_cafe_sync.yml new file mode 100644 index 0000000..4feda6a --- /dev/null +++ b/.github/workflows/run_cafe_sync.yml @@ -0,0 +1,27 @@ +name: Cafe Sync + +on: + schedule: + - cron: "0 * * * *" + push: + branches: + - master + +jobs: + sync: + name: Sync + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Get sha + - run: curl https://api.github.com/repos/ElaWorkshop/awesome-cn-cafe/branches/master --silent | grep "sha" | head -n1 > src/sha + + - name: Push new Cafe + - uses: EndBug/add-and-commit@v4 + with: + message: "chore: update source sha" + add: "src/sha" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 618bf95..c54e3b9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,4 @@ node_modules .DS_Store src/data.json src/build.ts -dist \ No newline at end of file +dist