From 76688c956ca07b197907daf1f1942f18e48ab380 Mon Sep 17 00:00:00 2001 From: "raoha.rh" Date: Fri, 13 Sep 2024 11:54:11 +0800 Subject: [PATCH] feat: add github actions --- amplify/backend/amplify-meta.json | 7 ++++ amplify/backend/backend-config.json | 28 ++++++++++++- .../amplifyhosting-template.json | 39 +++++++++++++++++++ amplify/team-provider-info.json | 8 ++++ 4 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 amplify/backend/hosting/amplifyhosting/amplifyhosting-template.json diff --git a/amplify/backend/amplify-meta.json b/amplify/backend/amplify-meta.json index 7c63aeaa..30ca2e87 100644 --- a/amplify/backend/amplify-meta.json +++ b/amplify/backend/amplify-meta.json @@ -11,5 +11,12 @@ "StackId": "arn:aws:cloudformation:ap-northeast-1:654654285942:stack/amplify-petercat-dev-d6f98/5c0f5a30-717f-11ef-a7eb-069726f40753", "AmplifyAppId": "dwu86qdv45on0" } + }, + "hosting": { + "amplifyhosting": { + "service": "amplifyhosting", + "providerPlugin": "awscloudformation", + "type": "manual" + } } } \ No newline at end of file diff --git a/amplify/backend/backend-config.json b/amplify/backend/backend-config.json index 9e26dfee..66082962 100644 --- a/amplify/backend/backend-config.json +++ b/amplify/backend/backend-config.json @@ -1 +1,27 @@ -{} \ No newline at end of file +{ + "hosting": { + "amplifyhosting": { + "providerPlugin": "awscloudformation", + "service": "amplifyhosting", + "type": "manual" + } + }, + "parameters": { + "AMPLIFY_hosting_amplifyhosting_appId": { + "usedBy": [ + { + "category": "hosting", + "resourceName": "amplifyhosting" + } + ] + }, + "AMPLIFY_hosting_amplifyhosting_type": { + "usedBy": [ + { + "category": "hosting", + "resourceName": "amplifyhosting" + } + ] + } + } +} \ No newline at end of file diff --git a/amplify/backend/hosting/amplifyhosting/amplifyhosting-template.json b/amplify/backend/hosting/amplifyhosting/amplifyhosting-template.json new file mode 100644 index 00000000..27f1afd9 --- /dev/null +++ b/amplify/backend/hosting/amplifyhosting/amplifyhosting-template.json @@ -0,0 +1,39 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "Branch stack creation for AWS Amplify Console", + "Parameters": { + "env": { + "Type": "String" + }, + "appId": { + "Type": "String" + }, + "type": { + "Type": "String" + } + }, + "Conditions": { + "isManual": { + "Fn::Equals": [ + { + "Ref": "type" + }, + "manual" + ] + } + }, + "Resources": { + "AmplifyBranch": { + "Condition": "isManual", + "Type": "AWS::Amplify::Branch", + "Properties": { + "BranchName": { + "Ref": "env" + }, + "AppId": { + "Ref": "appId" + } + } + } + } +} \ No newline at end of file diff --git a/amplify/team-provider-info.json b/amplify/team-provider-info.json index ff186186..7bb8366c 100644 --- a/amplify/team-provider-info.json +++ b/amplify/team-provider-info.json @@ -10,6 +10,14 @@ "StackName": "amplify-petercat-dev-d6f98", "StackId": "arn:aws:cloudformation:ap-northeast-1:654654285942:stack/amplify-petercat-dev-d6f98/5c0f5a30-717f-11ef-a7eb-069726f40753", "AmplifyAppId": "dwu86qdv45on0" + }, + "categories": { + "hosting": { + "amplifyhosting": { + "appId": "dwu86qdv45on0", + "type": "manual" + } + } } } } \ No newline at end of file