mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-07-29 21:01:16 -07:00
Add env variable to set path prefix (#706)
* Add env variable to set path prefix - When routing traffic to our new URL, the path prefix needs to be blank - adding path prefix to be set by env var to yml files * Update reference to env var in PATH_PREFIX * Update PR message URL with CDN - The actual website will point to the base url CDN
This commit is contained in:
parent
61fc8e6c15
commit
a532b652b4
4 changed files with 7 additions and 3 deletions
5
.github/workflows/deploy_main.yml
vendored
5
.github/workflows/deploy_main.yml
vendored
|
@ -32,6 +32,7 @@ jobs:
|
||||||
run: npm run build --if-present
|
run: npm run build --if-present
|
||||||
env:
|
env:
|
||||||
DATA_SOURCE: development
|
DATA_SOURCE: development
|
||||||
|
PATH_PREFIX: ""
|
||||||
- name: Get directory contents
|
- name: Get directory contents
|
||||||
run: ls -la public
|
run: ls -la public
|
||||||
- name: Lint
|
- name: Lint
|
||||||
|
@ -85,7 +86,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
message: |
|
message: |
|
||||||
**🚢 PR Deployed! 🚢**
|
**🚢 PR Deployed! 🚢**
|
||||||
Find it here: https://d2zjid6n5ja2pt.cloudfront.net/justice40-tool/${{env.DESTINATION_FOLDER}}/en/cejst/ !
|
Find it here: https://d2zjid6n5ja2pt.cloudfront.net/ !
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
repo-token-user-login: "github-actions[bot]" # The user.login for temporary GitHub tokens
|
repo-token-user-login: "github-actions[bot]" # The user.login for temporary GitHub tokens
|
||||||
allow-repeats: false # This is the default
|
allow-repeats: false # This is the default
|
||||||
|
@ -93,4 +94,4 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo "Github pages: https://usds.github.io/justice40-tool/$DESTINATION_FOLDER/en"
|
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 "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"
|
echo "Cloudfront https: https://d2zjid6n5ja2pt.cloudfront.net"
|
||||||
|
|
2
.github/workflows/deploy_staging.yml
vendored
2
.github/workflows/deploy_staging.yml
vendored
|
@ -30,7 +30,9 @@ jobs:
|
||||||
- name: Build
|
- name: Build
|
||||||
run: npm run build --if-present
|
run: npm run build --if-present
|
||||||
env:
|
env:
|
||||||
|
# Todo update this to env
|
||||||
DATA_SOURCE: development
|
DATA_SOURCE: development
|
||||||
|
PATH_PREFIX: "/justice40-tool/${{env.DESTINATION_FOLDER}}"
|
||||||
- name: Get directory contents
|
- name: Get directory contents
|
||||||
run: ls -la public
|
run: ls -la public
|
||||||
- name: Lint
|
- name: Lint
|
||||||
|
|
|
@ -7,7 +7,7 @@ module.exports = {
|
||||||
title: 'Justice40',
|
title: 'Justice40',
|
||||||
image: '/static/favicon.ico',
|
image: '/static/favicon.ico',
|
||||||
},
|
},
|
||||||
pathPrefix: `/justice40-tool/${process.env.DESTINATION_FOLDER}`,
|
pathPrefix: `${process.env.PATH_PREFIX}`,
|
||||||
plugins: [
|
plugins: [
|
||||||
{
|
{
|
||||||
resolve: 'gatsby-plugin-sass',
|
resolve: 'gatsby-plugin-sass',
|
||||||
|
|
|
@ -8,6 +8,7 @@ interface IZoomWarningProps {
|
||||||
zoomLevel: number
|
zoomLevel: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update this file to trigger build
|
||||||
const ZoomWarning = ({zoomLevel}: IZoomWarningProps) => {
|
const ZoomWarning = ({zoomLevel}: IZoomWarningProps) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue