-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build the preview server output as part of CI (#321)
- Loading branch information
Showing
6 changed files
with
56 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: CMS Preview Check | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
pull_request: | ||
jobs: | ||
preview: | ||
timeout-minutes: 15 | ||
runs-on: [self-hosted, asg] | ||
container: | ||
image: public.ecr.aws/docker/library/node:18.19.0-bullseye | ||
# Certs added for the self hosted runner | ||
env: | ||
NODE_EXTRA_CA_CERTS: /etc/ssl/certs/ca-certificates.crt | ||
APP_ENV: gha | ||
ports: | ||
- 80 | ||
volumes: | ||
- my_docker_volume:/home/runner | ||
- /etc/ssl/certs:/etc/ssl/certs | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- name: Setup Yarn | ||
run: | | ||
corepack enable | ||
corepack install -g --cache-only .yarn/releases/corepack.tgz | ||
- name: Install dependencies | ||
run: | | ||
yarn | ||
- name: Verify CMS preview build works | ||
run: yarn build:preview |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# This is the standard lower environment for Content API. | ||
NEXT_PUBLIC_DRUPAL_BASE_URL=https://content-build-medc0xjkxm4jmpzxl3tfbcs7qcddsivh.ci.cms.va.gov | ||
NEXT_IMAGE_DOMAIN=https://content-build-medc0xjkxm4jmpzxl3tfbcs7qcddsivh.ci.cms.va.gov | ||
|
||
# for Drupal preview | ||
DRUPAL_PREVIEW_SECRET=secret | ||
DRUPAL_CLIENT_ID=Retrieve this from AWS SSM /cms/consumers/next-build/client_id | ||
DRUPAL_CLIENT_SECRET=Retrieve this from AWS SSM /cms/consumers/next-build/client_secret | ||
|
||
# google analytics (These are the dev environment credentials) | ||
NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID=GTM-WFJWBD | ||
NEXT_PUBLIC_GOOGLE_TAG_MANAGER_AUTH=N9BisSDKAwJENFQtQIEvXQ | ||
NEXT_PUBLIC_GOOGLE_TAG_MANAGER_PREVIEW=env-423 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ describe('formatEventCTA', () => { | |
const result = createMailToLink(emailCTA, title, mostRecentDate, linkPath) | ||
|
||
expect(result).toBe( | ||
'mailto:[email protected]?subject=RSVP%20for%20Event%20Title%20on%20Thu%2C%20Sep%207%2C%202023%2C%2010%3A00%20AM%20EDT%20%E2%80%93%2012%3A00%20PM%20EDT&body=I%20would%20like%20to%20register%20for%20Event%20Title%20on%20Thu%2C%20Sep%207%2C%202023%2C%2010%3A00%20AM%20EDT%20%E2%80%93%2012%3A00%20PM%20EDT.%20(https%3A%2F%2Fva.gov%2Fevent-path)' | ||
'mailto:[email protected]?subject=RSVP%20for%20Event%20Title%20on%20Thu%2C%20Sep%207%2C%202023%2C%207%3A00%20AM%20PDT%20%E2%80%93%209%3A00%20AM%20PDT&body=I%20would%20like%20to%20register%20for%20Event%20Title%20on%20Thu%2C%20Sep%207%2C%202023%2C%207%3A00%20AM%20PDT%20%E2%80%93%209%3A00%20AM%20PDT.%20(https%3A%2F%2Fva.gov%2Fevent-path)' | ||
) | ||
}) | ||
}) | ||
|