Skip to content

Commit

Permalink
Add blog and docs to dev stage deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejearley committed Oct 24, 2023
1 parent 0b0083a commit 573528d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions apps/landing/src/pages/landing/Landing.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { ref } from 'vue'
const docsUrl = import.meta.env.PUBLIC_DOCS_URL
const faqItems = ref(
[
{
Expand Down Expand Up @@ -331,7 +331,7 @@ const toggleQuestionItem = (index: number) => {
<ul>
<li>
<a
href="https://docs.casimir.co"
:href="docsUrl"
target="_blank"
>Documentation</a>
</li>
Expand Down
14 changes: 8 additions & 6 deletions infrastructure/cdk/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import * as cdk from 'aws-cdk-lib'
import { Config } from './providers/config'
import { BlogStack } from './providers/blog'
import { UsersStack } from './providers/users'
import { NetworkStack } from './providers/network'
import { AnalyticsStack } from './providers/analytics'
import { BlogStack } from './providers/blog'
import { DocsStack } from './providers/docs'
import { DnsStack } from './providers/dns'
import { LandingStack } from './providers/landing'
import { NetworkStack } from './providers/network'
import { NodesStack } from './providers/nodes'
import { DnsStack } from './providers/dns'
import { UsersStack } from './providers/users'
import { WebStack } from './providers/web'

const config = new Config()
Expand All @@ -18,10 +19,11 @@ const { vpc } = new NetworkStack(app, config.getFullStackName('network'), { env

if (stage !== 'prod') {
new AnalyticsStack(app, config.getFullStackName('analytics'), { env })
new BlogStack(app, config.getFullStackName('blog'), { env, certificate, hostedZone, vpc })
new DocsStack(app, config.getFullStackName('docs'), { env, certificate, hostedZone })
new LandingStack(app, config.getFullStackName('landing'), { env, certificate, hostedZone })
new UsersStack(app, config.getFullStackName('users'), { env, certificate, hostedZone, vpc })
new WebStack(app, config.getFullStackName('web'), { env, certificate, hostedZone })
} else {
new NodesStack(app, config.getFullStackName('nodes'), { env, hostedZone })
}
new BlogStack(app, config.getFullStackName('blog'), { env, certificate, hostedZone, vpc })
new LandingStack(app, config.getFullStackName('landing'), { env, certificate, hostedZone })
5 changes: 3 additions & 2 deletions scripts/cdk/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ void async function () {
await loadCredentials()
process.env.AWS_ACCOUNT = await getSecret('casimir-aws-account')

process.env.BLOG_URL = `https://blog.${process.env.STAGE}.casimir.co`
process.env.USERS_URL = `https://users.${process.env.STAGE}.casimir.co`
process.env.BLOG_URL = process.env.STAGE === 'prod' ? 'https://blog.casimir.co' : `https://blog.${process.env.STAGE}.casimir.co`
process.env.DOCS_URL = process.env.STAGE === 'prod' ? 'https://docs.casimir.co' : `https://docs.${process.env.STAGE}.casimir.co`
process.env.USERS_URL = process.env.STAGE === 'prod' ? 'https://users.casimir.co' : `https://users.${process.env.STAGE}.casimir.co`
process.env.CRYPTO_COMPARE_API_KEY = await getSecret('casimir-crypto-compare-api-key')

const networkKey = process.env.NETWORK?.toUpperCase() || process.env.FORK?.toUpperCase() || 'TESTNET'
Expand Down

0 comments on commit 573528d

Please sign in to comment.