Skip to content

Commit d77cb05

Browse files
committedJun 7, 2024·
chore: Update SEO workflow to include S3 secrets and deploy step
1 parent a08eb75 commit d77cb05

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed
 

‎.github/workflows/seo.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
run: |
2929
sudo apt-get update
3030
sudo apt-get install -y libgbm-dev
31+
npx puppeteer browsers install chrome
3132
3233
- name: Run script
3334
env: # Or as an environment variable

‎scripts/migrator.ts

+2
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ async function putSecret(name: string, value?: string) {
112112
if (value) {
113113
console.log(`Put ${name}`)
114114
await $`echo "${value}" | bun wrangler secret put ${name}`
115+
} else {
116+
console.log(`Skip ${name}, value is not defined.`)
115117
}
116118
}
117119

‎server/src/services/seo.ts

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ export const SEOService = (db: DB, env: Env) => {
1919
for (const key in query) {
2020
url += `&${key}=${query[key]}`;
2121
}
22+
if (url.endsWith('/') || url === '') {
23+
url += 'index.html';
24+
}
2225
const key = path.join(folder, url);
2326
try {
2427
const url = `${accessHost}/${key}`;

0 commit comments

Comments
 (0)