.github/workflows/gen-daily.yml #237
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: workflow_dispatch | |
jobs: | |
datasets_gen_daily: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: oven-sh/setup-bun@v1 | |
name: setup bun | |
with: | |
bun-version: 1.0.22 | |
- name: install dependencies | |
run: bun install | |
- name: generate daily datasets | |
run: | | |
bun run gen-daily | |
mkdir -p site/src/generated/killed-in-gaza | |
bun run gen-killed-press | |
env: | |
TFP_SHEET_KEY: ${{ secrets.TFP_SHEET_KEY }} | |
- name: commit vars | |
id: commitvars | |
run: | | |
echo "currentdate=$(date '+%Y-%m-%d')" >> "$GITHUB_OUTPUT" | |
echo "branchname=ci-workflow-$(date '+%Y-%m-%d')" >> "$GITHUB_OUTPUT" | |
- uses: EndBug/add-and-commit@v9 # You can change this to use a specific version. | |
name: commit changes | |
with: | |
message: "daily: update for ${{ steps.commitvars.outputs.currentdate }}" | |
new_branch: ${{ steps.commitvars.outputs.branchname }} | |
push: true |