Cron #29
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: Install pipenv | |
run: pipx install pipenv | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
cache: pipenv | |
- name: Install dependencies | |
run: pipenv install | |
- 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: pipenv run main | |
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 }} |