CI: add ephemeral production mode ...
... so that public previews will be more complete
This commit is contained in:
parent
87a03e5ceb
commit
7ecbf2df52
@ -7,6 +7,11 @@ yarn --cwd ./scripts/shared-hugo-scripts/wiki/
|
||||
yarn --cwd ./scripts/shared-hugo-scripts/compatdb/
|
||||
yarn hugo version
|
||||
echo -e '\e[1m\e[36m========== Starting gulp deploy task ===============\e[0m'
|
||||
yarn run build
|
||||
if [[ -n "${EPHEMERAL_BASE_URL}" ]]; then
|
||||
echo -e "\e[1m\e[36m========== Ephemeral Mode URL: ${EPHEMERAL_BASE_URL} ===============\e[0m"
|
||||
yarn run gulp all --ephemeral "${EPHEMERAL_BASE_URL}"
|
||||
else
|
||||
yarn run build
|
||||
fi
|
||||
|
||||
echo -e '\e[1m\e[32m Success! Site deployed to `build` folder.\e[0m'
|
||||
|
@ -102,12 +102,18 @@ gulp.task('final:publish', function(done) {
|
||||
|
||||
const cname = 'citra-emu.org';
|
||||
var finalCommand = null;
|
||||
let ephemeralURL = null;
|
||||
|
||||
if (parseArgs(process.argv).production) {
|
||||
process.env.NODE_ENV = 'production';
|
||||
process.env.HUGO_ENV = 'PRD';
|
||||
process.env.HUGO_BASEURL = `https://${cname}`;
|
||||
finalCommand = 'final:publish';
|
||||
} else if ((ephemeralURL = parseArgs(process.argv).ephemeral)) {
|
||||
process.env.NODE_ENV = 'production';
|
||||
process.env.HUGO_ENV = 'PRD';
|
||||
process.env.HUGO_BASEURL = ephemeralURL;
|
||||
finalCommand = 'final:publish';
|
||||
} else {
|
||||
process.env.HUGO_ENV = 'DEV';
|
||||
process.env.HUGO_BASEURL = 'http://localhost:3000';
|
||||
|
Loading…
Reference in New Issue
Block a user