Skip to content

Commit

Permalink
chore: Update SEO workflow to include S3 secrets and deploy step
Browse files Browse the repository at this point in the history
  • Loading branch information
OXeu committed Jun 7, 2024
1 parent a08eb75 commit d77cb05
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/seo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y libgbm-dev
npx puppeteer browsers install chrome
- name: Run script
env: # Or as an environment variable
Expand Down
2 changes: 2 additions & 0 deletions scripts/migrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ async function putSecret(name: string, value?: string) {
if (value) {
console.log(`Put ${name}`)
await $`echo "${value}" | bun wrangler secret put ${name}`
} else {
console.log(`Skip ${name}, value is not defined.`)
}
}

Expand Down
3 changes: 3 additions & 0 deletions server/src/services/seo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export const SEOService = (db: DB, env: Env) => {
for (const key in query) {
url += `&${key}=${query[key]}`;
}
if (url.endsWith('/') || url === '') {
url += 'index.html';
}
const key = path.join(folder, url);
try {
const url = `${accessHost}/${key}`;
Expand Down

0 comments on commit d77cb05

Please sign in to comment.