Skip to content

Commit d9ea246

Browse files
authored
Replace sync script with Vercel deploy hook (#2348)
We require PRs to merge to `source`, so the old way won't work. Even if it did; I think GitHub actions triggering a push prevents other actions from firing, so it might not trigger a deploy anyway. Let's just tell Vercel to redeploy via a hook.
1 parent 961948b commit d9ea246

File tree

2 files changed

+6
-34
lines changed

2 files changed

+6
-34
lines changed
Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,12 @@
11
# Sched's API rate limits are very limited, so we sync non-critical part of the data on a cron.
22
on:
33
workflow_dispatch:
4-
# schedule:
5-
# - cron: "*/10 * * * *" # every ten minutes
4+
schedule:
5+
- cron: "0 */3 * * *" # Every 3 hours
66

77
jobs:
8-
sync:
8+
redeploy:
99
runs-on: ubuntu-latest
10-
permissions:
11-
contents: write
1210
steps:
13-
- name: Checkout code
14-
uses: actions/checkout@v5
15-
with:
16-
ref: source
17-
18-
- name: Setup environment
19-
uses: the-guild-org/shared-config/setup@main
20-
with:
21-
packageManager: pnpm
22-
workingDirectory: ./
23-
24-
- name: Install Dependencies
25-
run: pnpm i
26-
27-
- name: Sync conference data from Sched
28-
run: pnpm exec tsx scripts/sync-sched/sync.ts --year 2026
29-
env:
30-
SCHED_ACCESS_TOKEN_2026: ${{ secrets.SCHED_ACCESS_TOKEN_2026 }}
31-
32-
- name: Commit changes
33-
uses: planetscale/ghcommit-action@v0.1.6
34-
with:
35-
file_pattern: "scripts/sync-sched/*.json"
36-
commit_message: "Sync conference data from Sched"
37-
repo: ${{ github.repository }}
38-
branch: source
39-
empty: false
40-
env:
41-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
11+
- name: Trigger redeploy
12+
run: curl --fail --silent --show-error -X POST ${{ secrets.VERCEL_DEPLOY_HOOK }} >/dev/null

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"postbuild": "next-sitemap",
1818
"prebuild": "tsx scripts/get-github-info && node scripts/sync-landing-schema && node scripts/sync-working-groups",
1919
"start": "next start",
20+
"sync:sched": "tsx scripts/sync-sched/sync.ts --year 2026",
2021
"test": "playwright test && pnpm test:unit",
2122
"test:e2e": "playwright test",
2223
"test:show-report": "playwright show-report",

0 commit comments

Comments
 (0)