GitHub Pages not sourcing the env.sh file
-
Hello,
I was using the
main
branch of a website repo and noticed it wouldn't publish pages.Turns out the app isn't sourcing the
env.sh
file as the output below shows after editing theenv.sh
file 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
main
branch of a website repo and noticed it wouldn't publish pages.Turns out the app isn't sourcing the
env.sh
file as the output below shows after editing theenv.sh
file 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.sh
file at the start of the container.