Skip to content

Commit

Permalink
chore: change netlify config
Browse files Browse the repository at this point in the history
  • Loading branch information
neilcampbell committed Jun 11, 2024
1 parent 4b1eb65 commit 8ab30e6
Show file tree
Hide file tree
Showing 4 changed files with 246 additions and 17 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,20 +150,6 @@ jobs:
mkdir -p website
unzip website.zip -d website
- name: Handle Netlify redirect
run: |
echo "[[redirects]]
from = \"/algod/*\"
to = \"http://localhost:4001/:splat\"
status = 200
force = true
headers = {X-Algo-Api-Token = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"}
[[redirects]]
from = \"/*\"
to = \"/index.html\"
status = 200" > artifacts/website/netlify.toml
- name: Deploy website to Netlify
run: |
npx netlify-cli deploy --site ${{ secrets.NETLIFY_SITE_ID }} --auth ${{ secrets.NETLIFY_AUTH_TOKEN }} --dir artifacts/website --alias staging
Expand Down
11 changes: 11 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[[redirects]]
from = "/algod/*"
to = "http://localhost:4001/:splat"
status = 200
force = true
headers = {X-Algo-Api-Token = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}

[[redirects]]
from = "/*"
to = "/index.html"
status = 200
234 changes: 232 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"build:2-svg": "npx --yes @svgr/cli --config-file .svgrrc.cjs --typescript --out-dir src/features/common/components/svg src/assets/svg --no-index --filename-case kebab --jsx-runtime automatic",
"build:4-tsc": "tsc",
"build:5-vite": "vite build",
"build:6-netlify": "cpy netlify.toml dist",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint:fix": "npm run lint -- --fix",
"preview": "vite preview",
Expand Down Expand Up @@ -78,6 +79,7 @@
"autoprefixer": "^10.4.18",
"better-npm-audit": "^3.7.3",
"conventional-changelog-conventionalcommits": "^7.0.2",
"cpy-cli": "^5.0.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
Expand Down Expand Up @@ -157,4 +159,4 @@
"semantic-release-export-data"
]
}
}
}

0 comments on commit 8ab30e6

Please sign in to comment.