|
| 1 | +/* eslint-disable no-new */ |
1 | 2 | import type { Construct } from 'constructs'
|
2 | 3 | import type { StackProps } from 'aws-cdk-lib'
|
3 | 4 | import {
|
@@ -169,60 +170,52 @@ export class StacksCloud extends Stack {
|
169 | 170 | })
|
170 | 171 |
|
171 | 172 | // Create a Route53 record pointing to the CloudFront distribution
|
172 |
| - // eslint-disable-next-line no-new |
173 | 173 | new route53.ARecord(this, 'AliasRecord', {
|
174 | 174 | recordName: domainName,
|
175 | 175 | zone,
|
176 | 176 | target: route53.RecordTarget.fromAlias(new targets.CloudFrontTarget(distribution)),
|
177 | 177 | })
|
178 | 178 |
|
179 | 179 | // Create a Route53 record pointing to the Docs CloudFront distribution
|
180 |
| - // eslint-disable-next-line no-new |
181 | 180 | new route53.ARecord(this, 'DocsAliasRecord', {
|
182 | 181 | recordName: `${app.subdomains.docs}.${domainName}`,
|
183 | 182 | zone,
|
184 |
| - target: route53.RecordTarget.fromAlias(new targets.CloudFrontTarget(distribution)), |
| 183 | + target: route53.RecordTarget.fromAlias(new targets.CloudFrontTarget(docsDistribution)), |
185 | 184 | })
|
186 | 185 |
|
187 |
| - // eslint-disable-next-line no-new |
188 | 186 | new route53.CnameRecord(this, 'WwwCnameRecord', {
|
189 | 187 | zone,
|
190 | 188 | recordName: 'www',
|
191 | 189 | domainName,
|
192 | 190 | })
|
193 | 191 |
|
194 |
| - // eslint-disable-next-line no-new |
195 | 192 | new s3deploy.BucketDeployment(this, 'DeployWebsite', {
|
196 | 193 | sources: [s3deploy.Source.asset('../../../storage/public')],
|
197 | 194 | destinationBucket: webBucket,
|
198 | 195 | distribution,
|
199 | 196 | distributionPaths: ['/*'],
|
200 | 197 | })
|
201 | 198 |
|
202 |
| - // eslint-disable-next-line no-new |
203 | 199 | new s3deploy.BucketDeployment(this, 'DeployDocs', {
|
204 | 200 | sources: [s3deploy.Source.asset('../../../storage/app/docs')],
|
205 |
| - destinationBucket: webBucket, |
206 |
| - distribution, |
| 201 | + destinationBucket: docsBucket, |
| 202 | + distribution: docsDistribution, |
207 | 203 | distributionPaths: ['/*'],
|
208 | 204 | })
|
209 | 205 |
|
210 | 206 | // Prints out the web endpoint to the terminal
|
211 |
| - // eslint-disable-next-line no-new |
212 | 207 | new Output(this, 'AppUrl', {
|
213 | 208 | value: `https://${domainName}`,
|
214 | 209 | description: 'The URL of the deployed application',
|
215 | 210 | })
|
216 | 211 |
|
217 | 212 | // Prints out the web endpoint to the terminal
|
218 |
| - // eslint-disable-next-line no-new |
219 | 213 | new Output(this, 'DocsUrl', {
|
220 | 214 | value: `https://${app.subdomains.docs}.${app.url}`,
|
221 | 215 | description: 'The URL of the deployed documentation',
|
222 | 216 | })
|
223 | 217 |
|
224 | 218 | // Prints out the web endpoint to the terminal
|
225 |
| - // eslint-disable-next-line no-new |
226 | 219 | new Output(this, 'VanityUrl', {
|
227 | 220 | value: `https://${distribution.domainName}`,
|
228 | 221 | description: 'The vanity URL of the deployed application',
|
|
0 commit comments