Merge pull request #225 from brechtDR/feature/article-series-start-go… #478
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 16.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '16.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: 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 and jobs files' |