From 1dc9b6c9862bb6f7eaba14ef3175ef19e4ccf718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Tue, 15 Oct 2019 21:00:10 +0200 Subject: [PATCH] Add command for staging env (#33) --- docs/config.staging.php | 2 +- netlify.toml | 3 +++ staging.sh | 10 ++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100755 staging.sh diff --git a/docs/config.staging.php b/docs/config.staging.php index aa25491..cf71d5c 100644 --- a/docs/config.staging.php +++ b/docs/config.staging.php @@ -1,7 +1,7 @@ 'http://jigsaw-docs-staging.tighten.co', + 'baseUrl' => env('DEPLOY_URL') . '/docs', 'production' => false, // DocSearch credentials diff --git a/netlify.toml b/netlify.toml index cb6679e..f0b6319 100644 --- a/netlify.toml +++ b/netlify.toml @@ -3,6 +3,9 @@ environment = { PHP_VERSION = "7.2" } publish = "/dist" command = "./build.sh" +[context.deploy-preview] +command = "./staging.sh" + [[redirects]] from = "/docs/master/*" to = "/docs/v2/:splat" diff --git a/staging.sh b/staging.sh new file mode 100755 index 0000000..ee32155 --- /dev/null +++ b/staging.sh @@ -0,0 +1,10 @@ +set -e + +npm install +npm run production +cd docs + composer install + npm install + npm run staging + mkdir -p ../dist/docs + cp -R build_staging/* ../dist/docs \ No newline at end of file