Skip to content

Commit

Permalink
🔀 Merge #475 to deploy/rinkeby
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Sep 11, 2024
2 parents a29dc20 + bd81e31 commit 2d2992b
Show file tree
Hide file tree
Showing 6 changed files with 417 additions and 26 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,17 @@ on:
branches:
- 'deploy/main'

env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
GKE_CLUSTER: ${{ secrets.GKE_CLUSTER }}
GKE_ZONE: ${{ secrets.GKE_ZONE }}
DEPLOYMENT_NAME: ${{ secrets.DEPLOYMENT_NAME }}
IMAGE: ${{ secrets.GCR_IMAGE }}
GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}

jobs:
setup-build-publish-deploy:
name: Setup, Build, Publish, and Deploy
runs-on: ubuntu-latest
environment: production

env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
GKE_CLUSTER: ${{ secrets.GKE_CLUSTER }}
GKE_ZONE: ${{ secrets.GKE_ZONE }}
DEPLOYMENT_NAME: ${{ secrets.DEPLOYMENT_NAME }}
IMAGE: ${{ secrets.GCR_IMAGE }}
steps:
- name: Checkout
uses: actions/checkout@master
Expand Down Expand Up @@ -56,8 +52,12 @@ jobs:
build-args: |
"GITHUB_SHA=${{ github.sha }}"
"GITHUB_REF=${{ github.ref }}"
"GA_TRACKING_ID=${{ env.GA_TRACKING_ID }}"
"SENTRY_DSN=${{ env.SENTRY_DSN }}"
"GA_TRACKING_ID=${{ secrets.GA_TRACKING_ID }}"
"RELEASE=${{ github.sha }}"
"SENTRY_DSN=${{ vars.SENTRY_DSN }}"
"SENTRY_ORG=${{ vars.SENTRY_ORG }}"
"SENTRY_PROJECT=${{ vars.SENTRY_PROJECT }}"
"SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}"
# Deploy the Docker image to the GKE cluster
- name: Deploy
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/deploy-rinkeby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,18 @@ on:
branches:
- 'deploy/rinkeby'

env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
GKE_CLUSTER: ${{ secrets.GKE_CLUSTER }}
GKE_ZONE: ${{ secrets.GKE_ZONE }}
DEPLOYMENT_NAME: ${{ secrets.DEPLOYMENT_NAME }}
IMAGE: ${{ secrets.GCR_IMAGE }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
IS_TESTNET: 'TRUE'

jobs:
setup-build-publish-deploy:
name: Setup, Build, Publish, and Deploy
runs-on: ubuntu-latest
environment: rinkeby
env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
GKE_CLUSTER: ${{ secrets.GKE_CLUSTER }}
GKE_ZONE: ${{ secrets.GKE_ZONE }}
DEPLOYMENT_NAME: ${{ secrets.DEPLOYMENT_NAME }}
IMAGE: ${{ secrets.GCR_IMAGE }}
IS_TESTNET: 'TRUE'

steps:
- name: Checkout
Expand Down Expand Up @@ -57,6 +55,11 @@ jobs:
"IS_TESTNET=${{ env.IS_TESTNET }}"
"GITHUB_SHA=${{ github.sha }}"
"GITHUB_REF=${{ github.ref }}"
"RELEASE=${{ github.sha }}"
"SENTRY_DSN=${{ vars.SENTRY_DSN }}"
"SENTRY_ORG=${{ vars.SENTRY_ORG }}"
"SENTRY_PROJECT=${{ vars.SENTRY_PROJECT }}"
"SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}"
# Deploy the Docker image to the GKE cluster
- name: Deploy
Expand Down
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ ARG GA_TRACKING_ID
ENV GA_TRACKING_ID ${GA_TRACKING_ID}
ARG SENTRY_DSN
ENV SENTRY_DSN ${SENTRY_DSN}
ARG SENTRY_ORG
ENV SENTRY_ORG ${SENTRY_ORG}
ARG SENTRY_PROJECT
ENV SENTRY_PROJECT ${SENTRY_PROJECT}
ARG SENTRY_AUTH_TOKEN
ENV SENTRY_AUTH_TOKEN ${SENTRY_AUTH_TOKEN}
ENV NODE_ENV production
COPY ./ ./
RUN yarn build
Expand Down
19 changes: 17 additions & 2 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const {
CI,
GA_TRACKING_ID,
SENTRY_DSN,
SENTRY_AUTH_TOKEN,
RELEASE,
} = process.env;

export default {
Expand Down Expand Up @@ -159,12 +161,25 @@ export default {

sentry: {
config: {
ignoreErrors: ['WebAssembly.instantiate'],
release: RELEASE,
},
tracing: {
tracesSampleRate: IS_TESTNET ? 1.0 : 0.1,
browserTracing: {},
vueOptions: {
trackComponents: true,
},
vueRouterInstrumentationOptions: {
routeLabel: 'name',
},
},
publishRelease: !!RELEASE,
clientIntegrations: {
/* default integrations will still be added due to deep-merge */
ReportingObserver: false, // reporting is very noisy on CSP violation.
CaptureConsole: { levels: ['error'] },
},
clientConfig: {
ignoreErrors: ['WebAssembly.instantiate'],
},
},
sitemap: {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"@nuxtjs/storybook": "^4.1.1",
"@nuxtjs/stylelint-module": "^4.0.0",
"@nuxtjs/tailwindcss": "^5.3.5",
"@sentry/webpack-plugin": "2",
"@types/lodash.chunk": "^4.2.6",
"@types/lodash.debounce": "^4.0.6",
"@types/mime-types": "^2.1.1",
Expand Down
Loading

0 comments on commit 2d2992b

Please sign in to comment.