Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/deploy.yml → .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Main Deploy
name: CD

on:
push:
Expand All @@ -11,14 +11,13 @@ permissions:
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
name: Build
runs-on: ubuntu-latest
concurrency:
group: cd-build
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
Expand All @@ -38,6 +37,9 @@ jobs:
name: Deploy
needs: build
runs-on: ubuntu-latest
concurrency:
group: deploy-github-pages
cancel-in-progress: false
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI

on:
pull_request:

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
name: Build
runs-on: ubuntu-latest
concurrency:
group: pr-${{ github.event.number }}-build
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm

- run: pnpm install --frozen-lockfile
- run: pnpm build
2 changes: 1 addition & 1 deletion .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default defineConfig({
scanStartPath: 'archived',
basePath: '/archived/',
resolvePath: '/archived/',
useTitleFromFrontmatter: true,
useTitleFromFileHeading: true,
},
]),

Expand Down
54 changes: 54 additions & 0 deletions archived/aws-api-gateway-vuejs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# AWS API-Gateway → VueJS

Serve a Vue SPA through API-Gateway.

```sh
aws cloudformation deploy \
--stack-name vue-frontend-prod \
--template-file ./cloudformation.yml
```

```yml
Description: Vue HTTP API-Gateway
Resources:
FrontendApi:
Type: AWS::ApiGatewayV2::Api
Properties:
Name: vue-prod-frontend
ProtocolType: HTTP
DisableExecuteApiEndpoint: true
Tags:
Environment: production
FrontendIntegration:
Type: AWS::ApiGatewayV2::Integration
Properties:
ApiId:
Ref: FrontendApi
IntegrationType: HTTP_PROXY
IntegrationMethod: GET
IntegrationUri: https://vue-prod-frontend.s3.amazonaws.com/index.html
PayloadFormatVersion: 1.0
FrontendStage:
Type: AWS::ApiGatewayV2::Stage
Properties:
ApiId:
Ref: FrontendApi
StageName: $default
AutoDeploy: true
FrontendRootRoute:
Type: AWS::ApiGatewayV2::Route
Properties:
ApiId:
Ref: FrontendApi
RouteKey: GET /
Target:
Fn::Join: ['/', ['integrations', { Ref: FrontendIntegration }]]
FrontendAnyRoute:
Type: AWS::ApiGatewayV2::Route
Properties:
ApiId:
Ref: FrontendApi
RouteKey: GET /{any+}
Target:
Fn::Join: ['/', ['integrations', { Ref: FrontendIntegration }]]
```
Loading
Loading