Skip to content

Revalidate data hari libur #22

Revalidate data hari libur

Revalidate data hari libur #22

name: Ambil data hari libur
on:
schedule:
- cron: '1 7 1 * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: '>=18.*'
- name: Install dependecies
run: npm install
- name: Ambil data hari libur
run: |
npm run start
rm package-lock.json
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v18
id: verify-changed-files
with:
files: |
*.json
data/*.json
- name: Commit files
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
git config --local user.email "binsarjr121@gmail.com"
git config --local user.name "Binsar Dwi Jasuma"
d=`date '+%Y-%m-%dT%H:%M:%SZ'`
git commit -m "chore: update scrape data $d" -a
- name: Push changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: ad-m/github-push-action@master
with:
force: true
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}