Closed serhanwbahar closed 1 year ago
Also, @jakubgs, can you make the develop
default branch?
One thing worth noting, is taht ghp-import
can't work if we use HTTP endpoint to clone the repo:
And it fails with:
+ ghp-import -p out
fatal: could not read Username for 'https://github.com/': No such device or address
Instead we need to use the SSH/Git address:
And now it works: https://ci.infra.status.im/job/website/job/vac.dev/208/
One thing worth noting, is taht
ghp-import
can't work if we use HTTP endpoint to clone the repo:And it fails with:
+ ghp-import -p out fatal: could not read Username for 'https://github.com/': No such device or address
Instead we need to use the SSH/Git address:
Thank you for the notification. I'll be sure to update the relevant repositories accordingly.
The current implementation of the site builder requires content repo to be submited as a zip file for production using env vars
CONTENT_SOURCE_TYPE=git
andCONTENT_SOURCE_URL=repo-link.zip
which is not considered a best practice. Due to this, a race condition may occur during the build process if another commit is made while the build is in progress which may lead a security flow. To work around this,first, we checkout intosrc
usingcheckoutToSubdirectory('src')
. Then, we uselocal_folder
mode usingCONTENT_SOURCE_TYPE=local_folder
andCONTENT_SOURCE_URL=..src
env vars, just like a local develop.local_folder
mode copies the website files fromsrc
intodocs
because the site builder is incapable of copying it. We checkout the builder into thebuilder
directory and run theinstall
andbuild
commands inside of that directory. Finally, for publish stages, we copy theout
directory into the site repo, since the out directory is in the wrong repo.