Update table CI #712
This file contains hidden or 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
| # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | |
| name: Update table CI | |
| on: | |
| schedule: | |
| - cron: '0 15 * * *' | |
| - cron: '0 22 * * *' | |
| - cron: '30 3 * * *' | |
| - cron: '10 9 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| cache-dependency-path: './util/package-lock.json' | |
| - name: Install dependencies | |
| working-directory: ./util/ | |
| run: npm install | |
| - name: Run update js script | |
| working-directory: ./util/ | |
| run: node update.js | |
| - name: Push to origin | |
| working-directory: ./ | |
| run: | | |
| git add ./profile/README.md | |
| git add ./util/const.js | |
| if git diff --cached --quiet; then | |
| echo "[INFO] 새로 해결된 문제가 없습니다." | |
| exit 0 | |
| fi | |
| git config user.name github-actions | |
| git config user.email github-actions@github.com | |
| git commit -m "Docs: 문제 풀이 현황 테이블 정기 업데이트" | |
| git push origin main |