GitHub Pages not sourcing the env.sh file
-
Hello,
I was using the
mainbranch of a website repo and noticed it wouldn't publish pages.Turns out the app isn't sourcing the
env.shfile as the output below shows after editing theenv.shfile and restarting the app.Connecting... root@e0458cac-c74c-450f-9784-4ef0999b34cb:/app/code# echo $BUILD_BRANCH root@e0458cac-c74c-450f-9784-4ef0999b34cb:/app/code# cat ../data/env.sh #!/bin/bash export BUILD_BRANCH=main root@e0458cac-c74c-450f-9784-4ef0999b34cb:/app/code# echo $BUILD_BRANCH root@e0458cac-c74c-450f-9784-4ef0999b34cb:/app/code# source ../data/env.sh root@e0458cac-c74c-450f-9784-4ef0999b34cb:/app/code# echo $BUILD_BRANCH main root@e0458cac-c74c-450f-9784-4ef0999b34cb:/app/code#Thanks!
-
Hello,
I was using the
mainbranch of a website repo and noticed it wouldn't publish pages.Turns out the app isn't sourcing the
env.shfile as the output below shows after editing theenv.shfile and restarting the app.Connecting... root@e0458cac-c74c-450f-9784-4ef0999b34cb:/app/code# echo $BUILD_BRANCH root@e0458cac-c74c-450f-9784-4ef0999b34cb:/app/code# cat ../data/env.sh #!/bin/bash export BUILD_BRANCH=main root@e0458cac-c74c-450f-9784-4ef0999b34cb:/app/code# echo $BUILD_BRANCH root@e0458cac-c74c-450f-9784-4ef0999b34cb:/app/code# source ../data/env.sh root@e0458cac-c74c-450f-9784-4ef0999b34cb:/app/code# echo $BUILD_BRANCH main root@e0458cac-c74c-450f-9784-4ef0999b34cb:/app/code#Thanks!
@shaunsund the file is sourced in the start up script (ref: https://git.cloudron.io/packages/githubpages-app/-/blob/master/start.sh?ref_type=heads#L14 ) . Did you restart the app after you added the export ?
-
@shaunsund the file is sourced in the start up script (ref: https://git.cloudron.io/packages/githubpages-app/-/blob/master/start.sh?ref_type=heads#L14 ) . Did you restart the app after you added the export ?
@joseph I restarted the app several times.
A fresh restart gives me:
Reconnecting... root@e0458cac-c74c-450f-9784-4ef0999b34cb:/app/code# echo $BUILD_BRANCH root@e0458cac-c74c-450f-9784-4ef0999b34cb:/app/code# source /app/data/env.sh root@e0458cac-c74c-450f-9784-4ef0999b34cb:/app/code# echo $BUILD_BRANCH main root@e0458cac-c74c-450f-9784-4ef0999b34cb:/app/code#Something seems off with the start script - at least when it sources the
env.shfile at the start of the container.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login