Continuous Delivery #104
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: Continuous Delivery | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 1/16 * *" | |
push: | |
branches: | |
- "main" | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
fetch-depth: 2 | |
- name: Setup Python environment | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Run crawler script | |
shell: bash | |
run: python crawler.py | |
- name: Setup Haskell and Cabal | |
uses: haskell-actions/setup@v2 | |
with: | |
ghc-version: "9.6" | |
cabal-version: "3.10" | |
- name: Build parser | |
run: cabal build | |
- name: Generate ICS files | |
run: cabal run | |
- name: Commit changes | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
file_pattern: README.md docs/* data/* | |
commit_message: update calendar data automatically | |
commit_user_name: Muhan Li | |
commit_user_email: [email protected] | |
commit_author: Muhan Li <[email protected]> |