Skip to content

Commit

Permalink
fix: replacing
Browse files Browse the repository at this point in the history
  • Loading branch information
timbru31 authored Dec 17, 2024
1 parent d07bd66 commit c405d1b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/reusable-deploy-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ jobs:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-deploy-user
role-session-name: github-deployment

- name: Set environment variables without https
run: |
echo "FRONTEND_URL_WITHOUT_HTTPS=$(echo ${{ secrets.FRONTEND_URL }} | sed 's/^https:\/\///')" >> $GITHUB_ENV
echo "BACKEND_URL_WITHOUT_HTTPS=$(echo ${{ secrets.BACKEND_URL }} | sed 's/^https:\/\///')" >> $GITHUB_ENV
- name: Deploy Frontend
run: serverless s3sync bucket --bucket ${{ secrets.COMPANY_ABBREVIATION }}-lara-frontend-${{ inputs.target }}

Expand Down
11 changes: 4 additions & 7 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ custom:
ses:
region: ${self:provider.environment.SES_REGION, self:provider.region}

frontendUrlWithoutHttps: ${self:provider.environment.FRONTEND_URL.replace("https://", "")}
backendUrlWithoutHttps: ${self:provider.environment.BACKEND_URL.replace("https://", "")}

package:
individually: true
excludeDevDependencies: true
Expand Down Expand Up @@ -268,10 +265,10 @@ resources:
Type: AWS::CertificateManager::Certificate
Condition: IsProductionOrStaging
Properties:
DomainName: ${self:custom.frontendUrlWithoutHttps}
DomainName: ${self:custom.FRONTEND_URL_WITHOUT_HTTPS}
ValidationMethod: DNS
DomainValidationOptions:
- DomainName: ${self:custom.frontendUrlWithoutHttps}
- DomainName: ${self:custom.FRONTEND_URL_WITHOUT_HTTPS}
HostedZoneId: ${self:provider.environment.HOSTED_ZONE_ID}
Tags:
- Key: Name
Expand All @@ -281,10 +278,10 @@ resources:
Type: AWS::CertificateManager::Certificate
Condition: IsProductionOrStaging
Properties:
DomainName: ${self:custom.backendUrlWithoutHttps}
DomainName: ${self:custom.BACKEND_URL_WITHOUT_HTTPS}
ValidationMethod: DNS
DomainValidationOptions:
- DomainName: ${self:custom.backendUrlWithoutHttps}
- DomainName: ${self:custom.BACKEND_URL_WITHOUT_HTTPS}
HostedZoneId: ${self:provider.environment.HOSTED_ZONE_ID}
Tags:
- Key: Name
Expand Down

0 comments on commit c405d1b

Please sign in to comment.