.github/workflows/build.yml #337
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
on: | |
push: | |
paths: | |
- '.github/workflows/build.yml' | |
- 'bin/import' | |
- 'db/schema.sql' | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get branch name | |
id: branch-name | |
uses: tj-actions/branch-names@v6 | |
- name: checkout repo content | |
uses: actions/checkout@v3 # checkout the repository content to github runner | |
- name: import contributions | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: make import | |
- name: commit & push changes | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
branch: '${{ steps.branch-name.outputs.current_branch }}' | |
commit_message: 'Build website' | |
commit_user_name: GitHub Actions | |
commit_author: | |
GitHub Actions <[email protected]> # defaults to author of the commit that triggered the run | |
# See https://git-scm.com/docs/git-add#_options | |
add_options: | |
'-u' | |
# See https://git-scm.com/docs/git-push#_options | |
push_options: | |
'--force' | |
# Optional. Create given branch name in local and remote repository. | |
create_branch: true |