Merge pull request #265 from SteveJonk/feat/steve-scroll-timeline-blog #593
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: | |
- develop | |
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 }} | |
SUPABASE_PROJECT_URL: ${{ secrets.SUPABASE_PROJECT_URL }} | |
SUPABASE_SECRET_KEY: ${{ secrets.SUPABASE_SECRET_KEY }} | |
steps: | |
- name: Checkout current repository to Master branch | |
uses: actions/checkout@v2 | |
- name: Setup NodeJs 20.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '20.x' | |
- name: Cache dependencies and build outputs to improve workflow execution time. | |
uses: actions/cache@v1 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-js-${{ hashFiles('package-lock.json') }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Update YouTube data | |
run: node scripts/youtube.js | |
- name: Update Jobs data | |
run: node scripts/jobs.js | |
- name: Update Events data | |
run: node scripts/events.js | |
- name: Commit and Push updated json files to the repository | |
uses: EndBug/add-and-commit@v9 | |
with: | |
add: 'data' | |
default_author: github_actions | |
new_branch: 'develop' | |
commit: '--no-verify' | |
message: 'chore(data): update YouTube, jobs and events files' |