Skip to content

Commit

Permalink
ci(beta): set SITE_URL during build
Browse files Browse the repository at this point in the history
  • Loading branch information
timmywil committed Sep 18, 2020
1 parent b165be6 commit 8c9be9a
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,33 @@ jobs:
deploy_integration:
docker:
- image: circleci/node:12
environment:
SITE_URL: https://beta.spokestack.io/
working_directory: ~/spokestack-website
steps:
- checkout
- *restore_npm_cache
- run: npm install --no-save
- *save_npm_cache

- run:
name: Run tests
command: npm test

# build the site with beta.spokestack.io
- *restore_gatsby_cache
- run:
name: Run build
command: npm run build
- *save_gatsby_cache

# upload to S3
- run:
name: Install Tools
command: sudo apt-get -y -qq install awscli
- run:
name: Build and push static site
command: SITE_URL="https://beta.spokestack.io/" npm run deploy
command: npm run deploy
- run:
name: Enable cloudfront cli
command: aws configure set preview.cloudfront true
Expand Down Expand Up @@ -103,15 +117,15 @@ workflows:
jobs:
- build:
filters:
branches:
ignore: develop
tags:
only:
- /\d+\.\d+\.\d+/
- deploy_integration:
filters:
branches:
only: develop
requires:
- build
- deploy_production:
filters:
branches:
Expand Down

0 comments on commit 8c9be9a

Please sign in to comment.