Automatically set branch version
Better branch support
This commit is contained in:
parent
5e8f854b79
commit
ef1ecca0ca
@ -17,7 +17,7 @@ We have tried to make it as simple as possible for people to create their own re
|
|||||||
* icon - The image to display for your registry. You can upload an image to `/site/public/` and reference that by https://domain.com/1.0/image.png or if you aren't using a {sub}domain by referencing it from https://username.github.io/repositoryname/1.0/image.png where image.png is the name of the image you uploaded.
|
* icon - The image to display for your registry. You can upload an image to `/site/public/` and reference that by https://domain.com/1.0/image.png or if you aren't using a {sub}domain by referencing it from https://username.github.io/repositoryname/1.0/image.png where image.png is the name of the image you uploaded.
|
||||||
* listUrl - The link to the root of your site. For example https://username.github.io/repositoryname/ it should always include a trailing slash.
|
* listUrl - The link to the root of your site. For example https://username.github.io/repositoryname/ it should always include a trailing slash.
|
||||||
* contactUrl - A link users can use to contact you on.
|
* contactUrl - A link users can use to contact you on.
|
||||||
If you are using a domain or a subdomain, your basePath will just be the current version number `basePath: '/1.0',`, otherwise change the value to include what you chose for the repository name in step 2 `basePath: '/repositoryname/1.0',`.
|
If you are using a domain or a subdomain, your basePath will just be `basePath: '/1.0',`, otherwise change the value to include what you chose for the repository name in step 2 `basePath: '/repositoryname/1.0',`. the `1.0` will be replaced with the branch name automatically, so you should always keep it as 1.0.
|
||||||
1. Upload your workspaces to the /workspaces folder
|
1. Upload your workspaces to the /workspaces folder
|
||||||
1. Go to Settings then Pages and select Branch - gh-pages and click Save
|
1. Go to Settings then Pages and select Branch - gh-pages and click Save
|
||||||
1. Check progress in Actions
|
1. Check progress in Actions
|
||||||
|
@ -17,9 +17,11 @@ for BRANCH in $(git branch --remotes --format '%(refname:lstrip=3)' | grep -Ev '
|
|||||||
git checkout $BRANCH
|
git checkout $BRANCH
|
||||||
node processing
|
node processing
|
||||||
cp -a public/. process
|
cp -a public/. process
|
||||||
|
sed -i "s/1.0/$SANITIZED_BRANCH/" site/next.config.js
|
||||||
npm run deploy --prefix site
|
npm run deploy --prefix site
|
||||||
cp -a process/. public/ # Have to run it again because the deploy wipes the file and folders out
|
cp -a process/. public/ # Have to run it again because the deploy wipes the file and folders out
|
||||||
rm -rf process
|
rm -rf process
|
||||||
|
sed -i "s/$SANITIZED_BRANCH/1.0/" site/next.config.js # Set it back to 1.0 so it can be changed again on the next loop
|
||||||
mv public base/$SANITIZED_BRANCH
|
mv public base/$SANITIZED_BRANCH
|
||||||
cp base/$SANITIZED_BRANCH/favicon.ico base/favicon.ico
|
cp base/$SANITIZED_BRANCH/favicon.ico base/favicon.ico
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user