mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-07-29 00:31:17 -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
|
||||
env:
|
||||
DATA_SOURCE: development
|
||||
PATH_PREFIX: ""
|
||||
- name: Get directory contents
|
||||
run: ls -la public
|
||||
- name: Lint
|
||||
|
@ -85,7 +86,7 @@ jobs:
|
|||
with:
|
||||
message: |
|
||||
**🚢 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-user-login: "github-actions[bot]" # The user.login for temporary GitHub tokens
|
||||
allow-repeats: false # This is the default
|
||||
|
@ -93,4 +94,4 @@ jobs:
|
|||
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"
|
||||
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
|
||||
run: npm run build --if-present
|
||||
env:
|
||||
# Todo update this to env
|
||||
DATA_SOURCE: development
|
||||
PATH_PREFIX: "/justice40-tool/${{env.DESTINATION_FOLDER}}"
|
||||
- name: Get directory contents
|
||||
run: ls -la public
|
||||
- name: Lint
|
||||
|
|
|
@ -7,7 +7,7 @@ module.exports = {
|
|||
title: 'Justice40',
|
||||
image: '/static/favicon.ico',
|
||||
},
|
||||
pathPrefix: `/justice40-tool/${process.env.DESTINATION_FOLDER}`,
|
||||
pathPrefix: `${process.env.PATH_PREFIX}`,
|
||||
plugins: [
|
||||
{
|
||||
resolve: 'gatsby-plugin-sass',
|
||||
|
|
|
@ -8,6 +8,7 @@ interface IZoomWarningProps {
|
|||
zoomLevel: number
|
||||
}
|
||||
|
||||
// Update this file to trigger build
|
||||
const ZoomWarning = ({zoomLevel}: IZoomWarningProps) => {
|
||||
return (
|
||||
<>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue