Make Cloudformation template file
This commit is contained in:
parent
b234ebe572
commit
49691587dc
1 changed files with 61 additions and 0 deletions
61
amplify-stack.yaml
Normal file
61
amplify-stack.yaml
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
AWSTemplateFormatVersion: '2010-09-09'
|
||||
Description: 'CloudFormation template for deploying Astro site to AWS Amplify'
|
||||
|
||||
Parameters:
|
||||
GitHubAccessToken:
|
||||
Type: String
|
||||
NoEcho: true
|
||||
Description: GitHub Access token for repository access
|
||||
|
||||
Resources:
|
||||
AmplifyApp:
|
||||
Type: AWS::Amplify::App
|
||||
UpdateReplacePolicy: Retain
|
||||
DeletionPolicy: Delete
|
||||
Properties:
|
||||
Name: blog_daisuke_nakahara
|
||||
Repository: https://github.com/Daisuke897/blog_daisuke_nakahara
|
||||
AccessToken: !Ref GitHubAccessToken
|
||||
Platform: WEB
|
||||
BuildSpec: |
|
||||
version: 1
|
||||
frontend:
|
||||
phases:
|
||||
preBuild:
|
||||
commands:
|
||||
- npm ci --cache .npm --prefer-offline
|
||||
build:
|
||||
commands:
|
||||
- npm run build
|
||||
artifacts:
|
||||
baseDirectory: dist
|
||||
files:
|
||||
- '**/*'
|
||||
cache:
|
||||
paths:
|
||||
- .npm/**/*
|
||||
CustomRules:
|
||||
- Source: '</^[^.]+$|\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|woff2|ttf|map|json)$)([^.]+$)/'
|
||||
Target: '/index.html'
|
||||
Status: '404-200'
|
||||
EnableBranchAutoDeletion: false
|
||||
CustomHeaders: ''
|
||||
|
||||
AmplifyBranch:
|
||||
Type: AWS::Amplify::Branch
|
||||
UpdateReplacePolicy: Retain
|
||||
DeletionPolicy: Delete
|
||||
Properties:
|
||||
AppId: !GetAtt AmplifyApp.AppId
|
||||
EnableAutoBuild: true
|
||||
EnablePullRequestPreview: false
|
||||
EnablePerformanceMode: false
|
||||
Stage: PRODUCTION
|
||||
BranchName: main
|
||||
Framework: Astro
|
||||
|
||||
Outputs:
|
||||
|
||||
AppId:
|
||||
Description: 'Amplify App ID'
|
||||
Value: !GetAtt AmplifyApp.AppId
|
||||
Loading…
Add table
Add a link
Reference in a new issue