Skip to content

bump webpack from 5.74.0 to 5.89.0 #726

bump webpack from 5.74.0 to 5.89.0

bump webpack from 5.74.0 to 5.89.0 #726

name: Continuous Integration
on:
push:
branches:
- '**'
tags-ignore:
- '**'
env:
CHROMEDRIVER_FILEPATH: /usr/local/share/chrome_driver/chromedriver
concurrency:
group: ${{ github.ref != 'refs/heads/master' && github.ref || github.sha }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
uses: ./.github/workflows/install
with:
key: ${{ hashFiles('yarn.lock') }}
yarn_cache_folder: .cache/yarn
path: |
.cache/yarn
node_modules
- name: Lint
run: yarn lint
testing:
name: Testing
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
uses: ./.github/workflows/install
with:
key: ${{ hashFiles('yarn.lock') }}
yarn_cache_folder: .cache/yarn
path: |
.cache/yarn
node_modules
- name: Test
run: yarn test
env:
NODE_ENV: test
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
uses: ./.github/workflows/install
with:
key: ${{ hashFiles('yarn.lock') }}
yarn_cache_folder: .cache/yarn
path: |
.cache/yarn
node_modules
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-gov-west-1
- name: Get va-vsp-bot token
uses: marvinpinto/[email protected]
with:
ssm_parameter: /devops/VA_VSP_BOT_GITHUB_TOKEN
env_variable_name: VA_VSP_BOT_GITHUB_TOKEN
- name: Build
run: GITHUB_API_KEY=${{ env.VA_VSP_BOT_GITHUB_TOKEN }} yarn build
- name: Compress documentation build
if: github.ref == 'refs/heads/master'
run: tar -C packages/documentation/public -cvf documentation.tar.bz2 .
- name: Upload documentation build artifact
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v2
with:
name: documentation.tar.bz2
path: documentation.tar.bz2
retention-days: 1
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: [linting, build]
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get Node version
id: get-node-version
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
- name: Setup Node and cache documentation dependencies
uses: actions/setup-node@v2
with:
node-version: ${{ steps.get-node-version.outputs.NODE_VERSION }}
cache: 'yarn'
cache-dependency-path: packages/documentation/yarn.lock
- name: Install dependencies
uses: nick-invision/retry@v2
with:
command: cd packages/documentation && yarn install --frozen-lockfile --prefer-offline --production=false
max_attempts: 3
timeout_minutes: 7
env:
YARN_CACHE_FOLDER: ~/.cache/yarn
- name: Download documentation build artifact
uses: actions/download-artifact@v2
with:
name: documentation.tar.bz2
- name: Extract documentation build artifact
run: |
mkdir packages/documentation/public
tar -C packages/documentation/public -xvf documentation.tar.bz2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-gov-west-1
- name: Get va-vsp-bot token
uses: marvinpinto/[email protected]
with:
ssm_parameter: /devops/VA_VSP_BOT_GITHUB_TOKEN
env_variable_name: VA_VSP_BOT_GITHUB_TOKEN
- name: Set username and email
run: |
git config user.email [email protected]
git config user.name va-vsp-bot
- name: Deploy
run: |
git remote set-url origin https://git:${{ env.VA_VSP_BOT_GITHUB_TOKEN }}@github.com/department-of-veterans-affairs/veteran-facing-services-tools.git
yarn deploy
working-directory: packages/documentation