feat: change preview api url #1584

Merged
konrad merged 1 commits from dpschen/frontend:feature/feat-change-preview-api-url into main 2022-02-23 12:05:06 +00:00
2 changed files with 4 additions and 2 deletions

View File

@ -123,7 +123,6 @@ steps:
- yarn serve:dist & npx wait-on http://localhost:4173 - yarn serve:dist & npx wait-on http://localhost:4173
- yarn test:frontend --browser chrome --record - yarn test:frontend --browser chrome --record
depends_on: depends_on:
- dependencies
- build-prod - build-prod
- name: deploy-preview - name: deploy-preview
@ -137,6 +136,9 @@ steps:
GITEA_TOKEN: GITEA_TOKEN:
from_secret: gitea_token from_secret: gitea_token
commands: commands:
- cp -r dist dist-preview
# Override the default api url used for preview
- sed -i 's|localhost:3456|try.vikunja.io|g' dist-preview/index.html
- shasum -a 384 -c ./scripts/deploy-preview-netlify.js.sha384 - shasum -a 384 -c ./scripts/deploy-preview-netlify.js.sha384
- node ./scripts/deploy-preview-netlify.js - node ./scripts/deploy-preview-netlify.js
depends_on: depends_on:

View File

@ -1,6 +1,6 @@
[build] [build]
command = "yarn build" command = "yarn build"
publish = "dist" publish = "dist-preview"
[[redirects]] [[redirects]]
from = "/*" from = "/*"