Attempt to merge Lighthouse Fix branch from Nat (#758)

* Add a11y tests in cypress for methodology page

- update cypress to version 8.5
- add HTML lang the <head> element
- change process list headings to h4
- add alt tag to download image icon
- move <GovBanner> into <Header>
- add documentation around a11y testing

* Add cypress a11y tests for cejst page

- add alt icon for mapIntro page
- change legend to be a normal div
- add a class that mimics the h4 styles
- remove superfluous styles

* Add cypress a11y tests for contact and 404 page

* Update snapshots

* Move static text in footer to copy folder

* Add cypress a11y test to About page

- add required h1 tag
- updates snapshot

* Add site_url.xml and modify robots.txt file

- adds plugins for robots.txt and sitemap
- remove env.local and will add env.production
- modifiy all yml files (docker and GHA) to specify new env variables
- refactor env variables to either DATA_SOURCE, SITE_URL or PATH_PREFIX
- set defaults for env variables in gatsby-config
- remove timeline component
- will add blank index page
- update README on info on env variables

* Add plugin to allow custom env vars

- allows system env vars, ie, DATA_SOURCE on client-side application

* Update displayed URLs in GHA to new CDN (d29)

- also updates the blank index.html

* Correct spacing

* Set SITE_URL to new CDN for robots.txt

* Remove SITE_URL as this is set by GHA

* Update README around docker and env vars
This commit is contained in:
Vim 2021-10-04 08:43:33 -07:00 committed by GitHub
commit 72d80a5803
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 999 additions and 748 deletions

View file

@ -31,8 +31,11 @@ jobs:
- name: Build
run: npm run build --if-present
env:
DATA_SOURCE: development
PATH_PREFIX: ""
# See the client readme for more info on environment variables:
# https://github.com/usds/justice40-tool/blob/main/client/README.md
DATA_SOURCE: cdn
# TODO: Update main URL when either is back up
SITE_URL: https://d29zfl8cj7y1zf.cloudfront.net/
- name: Get directory contents
run: ls -la public
- name: Lint
@ -76,7 +79,7 @@ jobs:
- name: Invalidate cache on AWS CDNs
uses: chetan/invalidate-cloudfront-action@master
env:
DISTRIBUTION: "ED03LPVC4OXSW" # TODO: set this as ENV var above
DISTRIBUTION: "E27WCOZZ03KIBX" # TODO: set this as ENV var above
PATHS: "/*"
AWS_REGION: "us-east-1"
AWS_ACCESS_KEY_ID: ${{ secrets.CLIENT_DEV_AWS_ACCESS_KEY_ID }}
@ -86,13 +89,13 @@ jobs:
with:
message: |
**🚢 PR Deployed! 🚢**
Find it here: https://d2zjid6n5ja2pt.cloudfront.net/ !
Find it here: https://d29zfl8cj7y1zf.cloudfront.net/ !
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: "github-actions[bot]" # The user.login for temporary GitHub tokens
allow-repeats: false # This is the default
- name: Printing deployment URLs
run: |
echo "Geoplatform official site (may or may not be up): https://screeningtool.geoplatform.gov/"
echo "The Cloudfront behind this official site: https://d29zfl8cj7y1zf.cloudfront.net/"
echo "Github pages: https://usds.github.io/justice40-tool/$DESTINATION_FOLDER/en"
echo "Standard S3 bucket version (http only) : http://usds-geoplatform-justice40-website.s3-website-us-east-1.amazonaws.com/justice40-tool/$DESTINATION_FOLDER/en"
echo "Cloudfront https: https://d2zjid6n5ja2pt.cloudfront.net"
echo "Geoplatform official site: https://screeningtool.geoplatform.gov/en/"
echo "The origin S3 bucket (http only) : http://usds-geoplatform-justice40-website.s3-website-us-east-1.amazonaws.com/justice40-tool/$DESTINATION_FOLDER/en"

View file

@ -30,8 +30,10 @@ jobs:
- name: Build
run: npm run build --if-present
env:
# Todo update this to env
DATA_SOURCE: development
# See the client readme for more info on environment variables:
# https://github.com/usds/justice40-tool/blob/main/client/README.md
DATA_SOURCE: cdn
SITE_URL: "http://usds-geoplatform-justice40-website.s3-website-us-east-1.amazonaws.com/"
PATH_PREFIX: "/justice40-tool/${{env.DESTINATION_FOLDER}}"
- name: Get directory contents
run: ls -la public
@ -93,5 +95,3 @@ jobs:
- name: Printing deployment URLs
run: |
echo "Github pages: https://usds.github.io/justice40-tool/$DESTINATION_FOLDER/en"
echo "Standard S3 bucket version (http only) : http://usds-geoplatform-justice40-website.s3-website-us-east-1.amazonaws.com/justice40-tool/$DESTINATION_FOLDER/en"
echo "Cloudfront https: https://d2zjid6n5ja2pt.cloudfront.net/justice40-tool/$DESTINATION_FOLDER/en"