Cron #474
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: Cron | |
on: | |
push: | |
branches: ["main"] | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Out Repo | |
uses: actions/checkout@v4 | |
- name: Setup uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
enable-cache: true | |
- name: Install dependencies | |
run: uv sync --frozen | |
- name: set locale | |
run: | | |
sudo locale-gen ja_JP.UTF-8 | |
sudo update-locale LANG=ja_JP.UTF-8 | |
- name: Download syukujitsu.csv | |
run: curl -vvv -LO ${{ env.CSV_URL }} | |
env: | |
CSV_URL: https://www8.cao.go.jp/chosei/shukujitsu/syukujitsu.csv | |
- name: Execute | |
run: uv run main.py | |
env: | |
TZ: ${{ secrets.TZ }} | |
- name: Deploy to Netlify | |
uses: nwtgck/[email protected] | |
with: | |
publish-dir: './dist' | |
production-deploy: true | |
enable-commit-comment: false | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} |