next-build content release workflow #20
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: 60 | |
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: prod | |
ports: | |
- 80 | |
volumes: | |
- /etc/ssl/certs:/etc/ssl/certs | |
steps: | |
# todo: make sure this uses latest tagged release | |
- 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 | |
- name: Gather vets-website assets | |
run: cd main && yarn setup | |
- name: Build site | |
uses: nick-fields/retry@v3 | |
with: | |
max_attempts: 3 | |
retry_on: error | |
timeout_minutes: 30 | |
command: cd main && yarn export --DRUPAL_CLIENT_ID ${{ secrets.PROD_DRUPAL_CLIENT_ID }} --DRUPAL_CLIENT_SECRET ${{ secrets.PROD_DRUPAL_CLIENT_SECRET }} --USE_REDIS=false | |
- name: Build sitemap | |
run: cd main && yarn build:sitemap |