Skip to content

chore(deps): update all patch dependencies #3769

chore(deps): update all patch dependencies

chore(deps): update all patch dependencies #3769

Workflow file for this run

name: Build-Test
on:
pull_request:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Load git submodules
run: git submodule sync && git submodule update --init
- name: Install hugo
run: |
wget https://github.com/gohugoio/hugo/releases/download/v0.55.6/hugo_extended_0.55.6_Linux-64bit.tar.gz \
&& tar -xvf hugo_extended_0.55.6_Linux-64bit.tar.gz hugo \
&& mv hugo /usr/local/bin \
&& rm hugo_extended_0.55.6_Linux-64bit.tar.gz
- name: Build english and french sites
run: |
hugo --ignoreCache -d ~/cds-website-dist
chmod -R 755 ~/cds-website-dist
- name: Cache build
uses: actions/cache@2b250bc32ad02700b996b496c14ac8c2840a2991 # v2.1.8
with:
path: |
~/cds-website-dist
key: ${{ runner.os }}-${{ github.sha }}
test:
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
lang: ["fr", "en"]
steps:
- name: Retrieve Cache
uses: actions/cache@2b250bc32ad02700b996b496c14ac8c2840a2991 # v2.1.8
with:
path: |
~/cds-website-dist
key: ${{ runner.os }}-${{ github.sha }}
- name: Setup Ruby
uses: ruby/setup-ruby@5311f05890856149502132d25c4a24985a00d426 # v1.153.0
with:
ruby-version: 3.0
- name: install html proofer
run: gem install html-proofer
- name: test
run: |
htmlproofer ~/cds-website-dist/${{ matrix.lang }} --allow_hash_href --ignore_empty_alt --disable_external --ignore_files=/lib/,/admin/ --checks=favicon
- name: Checkout
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: npm init
run: npm init -y
- name: uuid-test
run: |
npm install --include=dev && npm run uuid
deploy:
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs: test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- lang: "fr"
dist-id: "E36QWRCACLGK3S"
bucket: "cds-website-french-dist"
- lang: "en"
dist-id: "E29PLYL6H5XVXC"
bucket: "cds-website-english-dist"
steps:
- name: Retrieve Cache
uses: actions/cache@2b250bc32ad02700b996b496c14ac8c2840a2991 # v2.1.8
with:
path: |
~/cds-website-dist
key: ${{ runner.os }}-${{ github.sha }}
- name: Configure AWS credentials
id: aws-creds
uses: aws-actions/configure-aws-credentials@50ac8dd1e1b10d09dac7b8727528b91bed831ac0 # v3.0.2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ca-central-1
- name: Deploy and invalidate cache
run: |
aws s3 sync ~/cds-website-dist/${{ matrix.lang }} s3://${{ matrix.bucket }}/ --delete
aws cloudfront create-invalidation --cli-input-json "{\"DistributionId\":\"${{ matrix.dist-id}}\",\"InvalidationBatch\":{\"Paths\":{\"Quantity\":1,\"Items\":[\"/*\"]},\"CallerReference\":\"$(date +%s)\"}}"
- name: Report deployment to Sentinel
uses: cds-snc/sentinel-forward-data-action@main
with:
input_data: '{"product": "${{ matrix.bucket }}", "version": "${{ github.sha }}", "repository": "${{ github.repository }}", "environment": "production"}'
log_type: CDS_Product_Deployment_Data
log_analytics_workspace_id: ${{ secrets.LOG_ANALYTICS_WORKSPACE_ID }}
log_analytics_workspace_key: ${{ secrets.LOG_ANALYTICS_WORKSPACE_KEY }}