Skip to content

Commit

Permalink
Use production API for staging (#6152)
Browse files Browse the repository at this point in the history
* Use production build for staging

* Use production API for branch builds

* Rename build scripts 

Remove leading underscores for clarity.
  • Loading branch information
eatyourgreens authored May 26, 2022
1 parent 172d36f commit b35ff23
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
commit_id: ${{ github.sha }}
node_version: '16.x'
output: 'dist'
script: '_build-staging'
script: 'build-production'
deploy_staging_branch:
name: Deploy staging branch
uses: zooniverse/ci-cd/.github/workflows/deploy_static.yaml@main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
commit_id: ${{ github.sha }}
node_version: '16.x'
output: 'dist'
script: '_build-staging'
script: 'build-production'
deploy_staging:
name: Deploy staging
uses: zooniverse/ci-cd/.github/workflows/deploy_static.yaml@main
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@
"coverage": "nyc report --reporter=lcov",
"start": "export NODE_ENV=development; check-engines && check-dependencies && webpack-dashboard -p 3736 -- webpack-dev-server --config ./webpack.dev.js",
"_build": "export HEAD_COMMIT=$(git rev-parse --short HEAD); check-engines && check-dependencies && rimraf dist; webpack --config ./webpack.build.js --progress --color",
"_build-production": "export NODE_ENV=production; npm run _build",
"_build-staging": "export NODE_ENV=staging; npm run _build",
"build-production": "export NODE_ENV=production; npm run _build",
"serve-static": "export NODE_ENV=staging; check-engines && check-dependencies && npm run _build && node ./static-server.js",
"test-and-watch": "NODE_ENV=development BABEL_ENV=test mocha --watch --watch-extensions js,jsx,coffee,cjsx test/setup.js test/enzyme-configuration.js $(find app -name *.spec.js*) --reporter nyan || true",
"test": "NODE_ENV=development BABEL_ENV=test nyc mocha --exit test/setup.js test/enzyme-configuration.js $(find app -name *.spec.js*) --reporter nyan || true",
Expand Down

0 comments on commit b35ff23

Please sign in to comment.