citra-emu
/
citra-web
Archived
1
0
Fork 0

CI: add ephemeral production mode ...

... so that public previews will be more complete
This commit is contained in:
liushuyu 2021-06-11 15:04:27 -06:00
parent 87a03e5ceb
commit 7ecbf2df52
No known key found for this signature in database
GPG Key ID: 23D1CE4534419437
2 changed files with 12 additions and 1 deletions

View File

@ -7,6 +7,11 @@ yarn --cwd ./scripts/shared-hugo-scripts/wiki/
yarn --cwd ./scripts/shared-hugo-scripts/compatdb/ yarn --cwd ./scripts/shared-hugo-scripts/compatdb/
yarn hugo version yarn hugo version
echo -e '\e[1m\e[36m========== Starting gulp deploy task ===============\e[0m' 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' echo -e '\e[1m\e[32m Success! Site deployed to `build` folder.\e[0m'

View File

@ -102,12 +102,18 @@ gulp.task('final:publish', function(done) {
const cname = 'citra-emu.org'; const cname = 'citra-emu.org';
var finalCommand = null; var finalCommand = null;
let ephemeralURL = null;
if (parseArgs(process.argv).production) { if (parseArgs(process.argv).production) {
process.env.NODE_ENV = 'production'; process.env.NODE_ENV = 'production';
process.env.HUGO_ENV = 'PRD'; process.env.HUGO_ENV = 'PRD';
process.env.HUGO_BASEURL = `https://${cname}`; process.env.HUGO_BASEURL = `https://${cname}`;
finalCommand = 'final:publish'; 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 { } else {
process.env.HUGO_ENV = 'DEV'; process.env.HUGO_ENV = 'DEV';
process.env.HUGO_BASEURL = 'http://localhost:3000'; process.env.HUGO_BASEURL = 'http://localhost:3000';