테스트 2 #31
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: download | |
on: | |
issues: | |
types: [opened, edited, milestoned] | |
schedule: | |
- cron: '0 15 * * *' | |
jobs: | |
download: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
cache: 'npm' | |
cache-dependency-path: './package-lock.json' | |
- name: git fetch | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git checkout main | |
git fetch | |
git pull origin main | |
- name: crawl | |
run: node src/lib/data/crawl.js | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v45 | |
- name: make history | |
if: steps.chenged-files.outputs.any_changed == 'true' | |
run: node scripts/history.js | |
- name: Push changes | |
if: steps.chenged-files.outputs.any_changed == 'true' | |
run: | | |
git add . | |
git commit -m 'update' | |
git push 'https://${{ secrets.GITHUB_TOKEN }}@github.com/taikowiki/taiko-song-database' |