Skip to content

Commit 485685c

Browse files
committed
Remove vercel pull from actions, introduced with moving webmentions to Astro Action
1 parent 39545f0 commit 485685c

4 files changed

Lines changed: 39 additions & 22 deletions

File tree

.github/workflows/deployment-preview.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,20 @@ jobs:
2323
environment: preview
2424

2525
env:
26+
ASTRO_DB_APP_TOKEN: ${{ secrets.ASTRO_DB_APP_TOKEN }}
27+
ASTRO_DB_REMOTE_URL: ${{ secrets.ASTRO_DB_REMOTE_URL }}
28+
CONVERTKIT_API_KEY: ${{ secrets.CONVERTKIT_API_KEY }}
29+
CRON_SECRET: ${{ secrets.CRON_SECRET }}
2630
PUBLIC_GOOGLE_MAPS_API_KEY: ${{ vars.PUBLIC_GOOGLE_MAPS_API_KEY }}
2731
PUBLIC_GOOGLE_MAP_ID: ${{ vars.PUBLIC_GOOGLE_MAP_ID }}
2832
PUBLIC_SENTRY_DSN: ${{ vars.PUBLIC_SENTRY_DSN }}
29-
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
30-
PUBLIC_UPSTASH_SEARCH_REST_URL: ${{ vars.PUBLIC_UPSTASH_SEARCH_REST_URL }}
3133
PUBLIC_UPSTASH_SEARCH_READONLY_TOKEN: ${{ vars.PUBLIC_UPSTASH_SEARCH_READONLY_TOKEN }}
34+
PUBLIC_UPSTASH_SEARCH_REST_URL: ${{ vars.PUBLIC_UPSTASH_SEARCH_REST_URL }}
35+
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }}
36+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
3237
VERCEL_ORG_ID: ${{ vars.VERCEL_ORG_ID }}
3338
VERCEL_PROJECT_ID: ${{ vars.VERCEL_PROJECT_ID }}
39+
WEBMENTION_IO_TOKEN: ${{ secrets.WEBMENTION_IO_TOKEN }}
3440

3541
# Secrets are not available to forked PRs. Also, we don't want to deploy untrusted forks.
3642
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false
@@ -62,15 +68,14 @@ jobs:
6268
- name: Install Vercel CLI
6369
run: npm install --global vercel@latest
6470

65-
- name: Vercel pull (preview)
66-
env:
67-
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
68-
run: vercel pull --yes --environment=preview --token=${VERCEL_TOKEN}
71+
- name: Create Vercel project config
72+
run: |
73+
mkdir -p .vercel
74+
echo '{"projectId":"'"$VERCEL_PROJECT_ID"'","orgId":"'"$VERCEL_ORG_ID"'"}' > .vercel/project.json
6975
7076
- name: Vercel build (preview)
7177
env:
7278
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
73-
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
7479
run: vercel build --token=${VERCEL_TOKEN}
7580

7681
- name: Deploy to Vercel (preview)

.github/workflows/deployment-production.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,20 @@ jobs:
2020
environment: production
2121

2222
env:
23+
ASTRO_DB_APP_TOKEN: ${{ secrets.ASTRO_DB_APP_TOKEN }}
24+
ASTRO_DB_REMOTE_URL: ${{ secrets.ASTRO_DB_REMOTE_URL }}
25+
CONVERTKIT_API_KEY: ${{ secrets.CONVERTKIT_API_KEY }}
26+
CRON_SECRET: ${{ secrets.CRON_SECRET }}
2327
PUBLIC_GOOGLE_MAPS_API_KEY: ${{ vars.PUBLIC_GOOGLE_MAPS_API_KEY }}
2428
PUBLIC_GOOGLE_MAP_ID: ${{ vars.PUBLIC_GOOGLE_MAP_ID }}
2529
PUBLIC_SENTRY_DSN: ${{ vars.PUBLIC_SENTRY_DSN }}
26-
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
27-
PUBLIC_UPSTASH_SEARCH_REST_URL: ${{ vars.PUBLIC_UPSTASH_SEARCH_REST_URL }}
2830
PUBLIC_UPSTASH_SEARCH_READONLY_TOKEN: ${{ vars.PUBLIC_UPSTASH_SEARCH_READONLY_TOKEN }}
31+
PUBLIC_UPSTASH_SEARCH_REST_URL: ${{ vars.PUBLIC_UPSTASH_SEARCH_REST_URL }}
32+
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }}
33+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
2934
VERCEL_ORG_ID: ${{ vars.VERCEL_ORG_ID }}
3035
VERCEL_PROJECT_ID: ${{ vars.VERCEL_PROJECT_ID }}
36+
WEBMENTION_IO_TOKEN: ${{ secrets.WEBMENTION_IO_TOKEN }}
3137

3238
permissions:
3339
actions: read
@@ -55,16 +61,15 @@ jobs:
5561
- name: Install Vercel CLI
5662
run: npm install --global vercel@latest
5763

58-
- name: Vercel pull (production)
59-
env:
60-
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
61-
run: vercel pull --yes --environment=production --token=${VERCEL_TOKEN}
64+
- name: Create Vercel project config
65+
run: |
66+
mkdir -p .vercel
67+
echo '{"projectId":"'"$VERCEL_PROJECT_ID"'","orgId":"'"$VERCEL_ORG_ID"'"}' > .vercel/project.json
6268
6369
- name: Vercel build (production)
6470
env:
6571
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
6672
NODE_ENV: production
67-
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
6873
run: vercel build --prod --token=${VERCEL_TOKEN}
6974

7075
##

_TODO.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,6 @@ The text, diagrams, and images in this work are licensed under CC BY-NC 4.0
191191
All code samples in this article are licensed under the MIT License. Feel free to use, modify, and distribute them in any project.
192192
```
193193

194-
## Search
195-
196-
- How do we handle the keywords in the long form / pdf files from a search perspective? Can we return the result in the search results if the short form content is not returned in the search results, and highlight it somehow in the search results to show that it is gated content? And clicking on its link takes the user to the Download page for that item?
197-
198-
- Search box in header should have blue outline, not highlight
199-
200194
## Todo
201195

202196
- Re-enable link validator in `astro.config.ts` when pdf / downloads sorted out
@@ -219,3 +213,14 @@ All code samples in this article are licensed under the MIT License. Feel free t
219213
- Home page reorganization: move the "What I Deliver" box from the Hero into the Backstage image. Move the Backstage image / video to the hero.
220214

221215
- Add a "Preview Special" item to our Download CTA that lets the user know the Deep Dive content can be previewed in HTML format, and offer a switch to it.
216+
217+
218+
## Search
219+
220+
- How do we handle the keywords in the long form / pdf files from a search perspective? Can we return the result in the search results if the short form content is not returned in the search results, and highlight it somehow in the search results to show that it is gated content? And clicking on its link takes the user to the Download page for that item?
221+
222+
- Search box in header should have blue outline, not highlight
223+
224+
- going to the search page with a query appended gives a 404 error
225+
226+
- Search box on the search page is not working

src/lib/config/environmentalVariableValidation.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,14 @@ export const environmentalVariablesConfig: AstroUserConfig['env'] = {
155155
optional: false,
156156
}),
157157
/**
158-
* Site uses ConvertKit for managing newsletter subscriptions
158+
* Token for webmention.io API, used by the WebMentions component on
159+
* prerendered case-study pages. Optional so that a missing token does
160+
* not crash SSR pages at runtime (the component handles absence gracefully).
159161
*/
160162
WEBMENTION_IO_TOKEN: envField.string({
161163
access: 'secret',
162164
context: 'server',
163-
optional: false,
165+
optional: true,
164166
}),
165167
},
166168
/**

0 commit comments

Comments
 (0)