Add command for staging env (#33)

This commit is contained in:
Samuel Štancl 2019-10-15 21:00:10 +02:00 committed by GitHub
parent 99655ea7e0
commit 1dc9b6c986
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 1 deletions

View file

@ -1,7 +1,7 @@
<?php
return [
'baseUrl' => 'http://jigsaw-docs-staging.tighten.co',
'baseUrl' => env('DEPLOY_URL') . '/docs',
'production' => false,
// DocSearch credentials

View file

@ -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"

10
staging.sh Executable file
View file

@ -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