next-build content release workflow #7
Workflow file for this run
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
name: Content Release | |
on: | |
# TODO: remove pull_request, run on repo dispatch | |
pull_request: | |
# repository_dispatch: | |
# types: [content-release] | |
# workflow_run: | |
# workflows: ['Continuous Integration'] | |
# types: [completed] | |
# branches: [main] | |
jobs: | |
build: | |
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 | |
NEXT_PUBLIC_DRUPAL_BASE_URL: https://prod.cms.va.gov | |
NEXT_PUBLIC_IMAGE_URL: https://prod.cms.va.gov | |
ports: | |
- 80 | |
volumes: | |
- /etc/ssl/certs:/etc/ssl/certs | |
steps: | |
- name: Checkout next-build | |
uses: actions/checkout@v4 | |
with: | |
repository: department-of-veterans-affairs/next-build | |
path: main | |
- name: Checkout vets-website | |
uses: actions/checkout@v4 | |
with: | |
repository: department-of-veterans-affairs/vets-website | |
path: vets-website | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Setup Yarn | |
run: | | |
cd main | |
corepack enable | |
corepack install -g --cache-only .yarn/releases/corepack.tgz | |
- name: Install dependencies | |
run: | | |
cd main | |
yarn | |
# todo: update this command after cleanup PR lands | |
- name: Gather vets-website assets | |
run: | | |
cd main | |
BUILD_TYPE=vagovprod node ./scripts/yarn/vets-website-assets.mjs | |
- name: Start redis container | |
run: | | |
cd main | |
yarn redis | |
- name: Build site | |
uses: nick-fields/retry@v3 | |
with: | |
command: cd main && yarn export | |
max_attempts: 3 | |
retry_on: error | |
- name: Build sitemap | |
run: cd main && yarn build:sitemap --SITE_URL https://www.va.gov |