Skip to content

Commit ab10c33

Browse files
committed
feat: sync assets to s3
1 parent 33a01f0 commit ab10c33

File tree

15 files changed

+28
-780
lines changed

15 files changed

+28
-780
lines changed

.github/workflows/deploy.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,18 @@ jobs:
3333
- name: Pull Vercel Environment Information
3434
run: npx vercel pull .env --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
3535

36+
- name: Configure AWS Credentials
37+
uses: aws-actions/configure-aws-credentials@v4
38+
with:
39+
aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY }}
40+
aws-secret-access-key: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
41+
aws-region: ${{ secrets.AWS_S3_REGION }}
42+
3643
- name: Build Project Artifacts
3744
run: npx vercel build --yes --prod --token=${{ secrets.VERCEL_TOKEN }}
3845

46+
- name: Upload assets to S3
47+
run: aws s3 sync ./dist s3://${{ secrets.AWS_S3_BUCKET }}/assets --delete
48+
3949
- name: Deploy Project Artifacts to Vercel
4050
run: npx vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}

.github/workflows/preview.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,18 @@ jobs:
3333
- name: Pull Vercel Environment Information
3434
run: npx vercel env pull .env --yes --environment=preview --git-branch=next --token=${{ secrets.VERCEL_TOKEN }}
3535

36+
- name: Configure AWS Credentials
37+
uses: aws-actions/configure-aws-credentials@v4
38+
with:
39+
aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY }}
40+
aws-secret-access-key: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
41+
aws-region: ${{ secrets.AWS_S3_REGION }}
42+
3643
- name: Build Project Artifacts
3744
run: npx vercel build --yes --token=${{ secrets.VERCEL_TOKEN }}
3845

46+
- name: Upload assets to S3
47+
run: aws s3 sync ./dist s3://${{ secrets.AWS_S3_BUCKET }}/assets --delete
48+
3949
- name: Deploy Project Artifacts to Vercel
4050
run: npx vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}

app/pages/blog/[slug].vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const route = useRoute()
1010
1111
const { data: post } = await useAsyncData(route.path, () => queryContent<BlogPost>(route.path).findOne())
1212
if (!post.value) {
13-
throw createError({ statusCode: 404, statusMessage: 'Post not found', fatal: true })
13+
throw createError({ statusCode: 404, statusMessage: 'Post not found' })
1414
}
1515
1616
const { data: surround } = await useAsyncData(`${route.path}-surround`, () => queryContent('/blog')

app/pages/blog/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ definePageMeta({
77
88
const { data: page } = await useAsyncData('blog', () => queryContent('/blog').findOne())
99
if (!page.value) {
10-
throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true })
10+
throw createError({ statusCode: 404, statusMessage: 'Page not found' })
1111
}
1212
1313
const { data: posts } = await useAsyncData('posts', () => queryContent<BlogPost>('/blog')

app/pages/docs/[...slug].vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const route = useRoute()
99
1010
const { data: page } = await useAsyncData(route.path, () => queryContent(route.path).findOne())
1111
if (!page.value) {
12-
throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true })
12+
throw createError({ statusCode: 404, statusMessage: 'Page not found' })
1313
}
1414
1515
const { data: surround } = await useAsyncData(`${route.path}-surround`, () => queryContent('/docs')

app/pages/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ definePageMeta({
55
66
const { data: page } = await useAsyncData('index', () => queryContent('/').findOne())
77
if (!page.value) {
8-
throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true })
8+
throw createError({ statusCode: 404, statusMessage: 'Page not found' })
99
}
1010
1111
useSeoMeta({

app/pages/pricing.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ definePageMeta({
55
66
const { data: page } = await useAsyncData('pricing', () => queryContent('/pricing').findOne())
77
if (!page.value) {
8-
throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true })
8+
throw createError({ statusCode: 404, statusMessage: 'Page not found' })
99
}
1010
1111
useSeoMeta({

content/1.docs/1.getting-started/2.installation.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

content/3.blog/2.pyrenees.md

Lines changed: 0 additions & 93 deletions
This file was deleted.

content/3.blog/3.james-webb.md

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)