Update Reviews #122
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: Update Reviews | |
on: | |
workflow_dispatch: {} | |
schedule: | |
- cron: '00 16 * * 0' | |
env: | |
SPOTIFY_CLIENT_ID: ${{ secrets.SPOTIFY_CLIENT_ID }} | |
SPOTIFY_CLIENT_SECRET: ${{ secrets.SPOTIFY_CLIENT_SECRET }} | |
TURSO_DATABASE_URL: ${{ secrets.TURSO_DATABASE_URL }} | |
TURSO_DATABASE_AUTH_TOKEN: ${{ secrets.TURSO_DATABASE_AUTH_TOKEN }} | |
NODE_VERSION: 16 | |
jobs: | |
UpdatePublications: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: main | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: 'Pull Pitchfork Best New Music reviews' | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 5 | |
command: npm run seed-script -- app/jobs/pitchfork.ts --slug bnm | |
- name: 'Pull Pitchfork Best New Reissue reviews' | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 5 | |
command: npm run seed-script -- app/jobs/pitchfork.ts --slug bnr | |
- name: 'Pull Pitchfork Sunday Reviews' | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 5 | |
command: npm run seed-script -- app/jobs/pitchfork.ts --slug sunday-reviews | |
- name: 'Pull Pitchfork 8.0+ reviews' | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 5 | |
command: npm run seed-script -- app/jobs/pitchfork.ts --slug 8-plus | |
- name: 'Pull Pitchfork 7.0+ reviews' | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 5 | |
command: npm run seed-script -- app/jobs/pitchfork.ts --slug 7-plus | |
- name: 'Pull Bandcamp Daily reviews' | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 5 | |
command: npm run seed-script -- app/jobs/bandcamp-daily.ts | |
# @TODO This keeps timing out on the last pages. Data doesn't update | |
# often, so we can run it manually for now. | |
# - name: 'Pull 33⅓ reviews' | |
# uses: nick-fields/retry@v2 | |
# with: | |
# timeout_minutes: 10 | |
# max_attempts: 5 | |
# command: npm run seed-script -- app/jobs/33-13.ts | |
# @TODO This keeps running into issues because albumoftheyear.org is being | |
# super annoying about scraping. | |
# - name: 'Pull Needle Drop reviews' | |
# uses: nick-fields/retry@v2 | |
# with: | |
# timeout_minutes: 10 | |
# max_attempts: 5 | |
# command: npm run seed-script -- app/jobs/needle-drop.ts |