Skip to content

Commit

Permalink
fix(app): surge fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
9inpachi committed Dec 24, 2020
1 parent 3cb36a2 commit 613bfce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ install:
script:
- cd ./packages/phoenix-ng
- npm run test:coverage -- --no-progress --browsers=ChromeHeadlessCI
- cd ../..
# Set up surge and deploy for PR
- if [ "$TRAVIS_PULL_REQUEST" != false ]; then npm install surge --global; fi
- if [ "$TRAVIS_PULL_REQUEST" != false ]; then npm run deploy:web; fi
# Deploy the PR to surge
- if [ "$TRAVIS_PULL_REQUEST" != false ]; then chmod +x ./scripts/pr_deploy.sh; ./scripts/pr_deploy.sh; fi

after_success:
- cd ./packages/phoenix-ng
- npm run coveralls
# Deploy the PR to surge
- if [ "$TRAVIS_PULL_REQUEST" != false ]; then chmod +x ./scripts/pr_deploy.sh; ./scripts/pr_deploy.sh; fi
2 changes: 1 addition & 1 deletion scripts/pr_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ then
PR_DOMAIN=http://phoenix-pr-${TRAVIS_PULL_REQUEST}.surge.sh
GH_API_PR=https://api.github.com/repos/HSF/phoenix/pulls/${TRAVIS_PULL_REQUEST}

surge --project ../packages/phoenix-ng/docs/ --domain ${PR_DOMAIN};
surge --project ./packages/phoenix-ng/docs/ --domain ${PR_DOMAIN};

curl -H "Authorization: token ${GH_TOKEN}" --request POST ${GH_API_PR} --data '{"state": "success", "target_url": "'${PR_DOMAIN}'", "description": "Pull request deployed", "context": "CollectiveDynamicDeploy"}'

Expand Down

0 comments on commit 613bfce

Please sign in to comment.