Skip to content

Save output to GitHub #620

Save output to GitHub

Save output to GitHub #620

Workflow file for this run

name: Save output to GitHub
on:
schedule:
- cron: "30 16 * * *"
push:
branches:
- master
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
save-output:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
# Caching pipenv dependencies:
- name: Install pipenv
run: pipx install pipenv
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pipenv'
- run: pipenv install
- name: Run program and generate output
run: |
pipenv run python script/kfc.py
mv -f coupon.js js/coupon.js
- name: Commit and push changes
uses: EndBug/add-and-commit@v9
with:
add: 'js/coupon.js'
message: 'daily update cpupon informations'
committer_name: GitHub Actions
committer_email: 41898282+github-actions[bot]@users.noreply.github.com
- name: Archive log file
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: debug-log
path: debug.log
retention-days: 30