Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: optimize continuous integration #1308

Merged
merged 4 commits into from
Mar 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ jobs:
- run:
name: Run Test Suites
command: yarn test
- run:
name: Test v1 static website Builds
command: cd website-1.x && yarn build
- run:
name: Test v2 static website Builds
command: cd website && yarn build

# The CIRCLE_ variables are defined during the CircleCI build process
# https://circleci.com/docs/1.0/environment-variables/
Expand All @@ -81,10 +75,12 @@ jobs:
echo "machine github.com login docusaurus-bot password $DOCUSAURUS_PUBLISH_TOKEN" > ~/.netrc
fi
- run:
name: Deploy Website
name: Deploy v1 Website
# Skip the deploy if we don't have the right org (facebook), or if this is just a pull request
command: |
if [[ $CIRCLE_PROJECT_USERNAME == "facebook" && -z $CI_PULL_REQUEST && -z $CIRCLE_PR_USERNAME ]]; then
if ! git diff-tree --no-commit-id --name-only -r HEAD | grep -E "(^docs\/.*)|(docusaurus-1\.x\/.*)|(website-1\.x\/.*)"; then
echo "Skipping deploy. No relevant v1 website files have changed"
elif [[ $CIRCLE_PROJECT_USERNAME == "facebook" && -z $CI_PULL_REQUEST && -z $CIRCLE_PR_USERNAME ]]; then
echo "Deploying website..."
# install Docusaurus and generate file of English strings
cd website-1.x && yarn run write-translations
Expand Down