Main Build #124
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: Main Build | |
on: | |
push: | |
branches: ['master'] | |
schedule: | |
- cron: '0 7 * * 2,4' # At 07:00 on Tuesday and Thursday | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }} | |
strategy: | |
matrix: | |
node-version: [20.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run prettier | |
run: npm run format | |
- name: Run lint | |
run: npm run lint | |
- name: Update YouTube data | |
run: node src/scripts/youtube.cjs | |
- name: Update Events data | |
run: node src/scripts/events.cjs | |
- name: Update Jobs data | |
run: node src/scripts/jobs.cjs | |
- name: Commit and Push updated json files to the repository | |
uses: EndBug/[email protected] | |
with: | |
add: '.' | |
default_author: github_actions | |
new_branch: 'master' | |
commit: '--no-verify' | |
message: 'chore(data): format and update files' |