feat: change preview api url #1584
No reviewers
Labels
No Label
area/internal-code
changes requested
confirmed
dependencies
duplicate
good first issue
help wanted
hosting
invalid
kind/bug
kind/feature
question
wontfix
No Milestone
No project
No Assignees
3 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: vikunja/frontend#1584
Loading…
Reference in New Issue
No description provided.
Delete Branch "dpschen/frontend:feature/feat-change-preview-api-url"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi dpschen!
Thank you for creating a PR!
I've deployed the changes of this PR on a preview environment under this URL: https://1584-feature-feat-change-preview-api---vikunja-frontend-preview.netlify.app
You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/.
Have a nice day!
@ -138,2 +138,4 @@
from_secret: gitea_token
commands:
# Override the default api url used for preview
- sed -i 's|http://localhost:3456/api/v1|https://try.vikunja.io/api/v1|g' dist/index.html
Great idea! We should make sure this doesn't interfer with the tests since the same bundle is used for the tests as well.
Wouldn't that collide here:
27bba71d8a/.drone.yml (L122)
?I think so yes. Because
yarn serve:dist
will only serve whatever is in thedist
folder, and if that gets reloaded we'll probably use the wrong api for the tests.An option would be to wait with the deploy step until the tests are done.
I think linting is fine, since it's so fast (didn't check if we do that already).
If we wait for Cypress it will take a lot longer. I wouldn't like that.
Then I think copying the dist folder, making the adjustments and then deploying that would be the way to go?
After thinking about it I think I'm not understanding what you mean, sry :D
What shall I adjust?
Something like this:
And then adjust the netlify deploy script to deploy
dist-preview
instead ofdist
.Adjusted! :check
Does it work? Looks like the link is broken.
I think I know why. Doesn't netlify build it again?
And if not what else is the
yarn build
in the netlify.toml for?Usually netlify builds the site when pusing to the git repo - that's what the config parameter is required for. We're not really using that though.
I removed it before – that didn't work. But now it also doesn't work with it :D
27bba71d8a
to21cfb31a4a
21cfb31a4a
tob0b314df1a
WIP: feat: change preview api urlto feat: change preview api urlShould be fine to merge if the deploy works.
bed28b9d3c
to689e1800a4
957ffdcdb4
to7599f8c7b9
3a9c876018
to7599f8c7b9
7599f8c7b9
toc44c129af4
Does it work?
Doesn't seem so :(
I still don't understand #1584 (comment)
Looks like it works: #1601 (comment)
Merging this one now.
Cool =)
Did you also test if it works if we remove the
yarn build
?I didn't. I think netlify's cli requires it, even if it is not used because we're pushing a built bundle directly?
But they do support static deployments, which basically this is, no?
By default you push code in your git repo and they will build and deploy it: https://www.netlify.com/products/build/
But the cli can also "only" deploy a pre-built bundle which is what we're doing. Their build system needs to know what command to run to build the site and because that behavior is the default, they require it in the config.