mirror of https://github.com/status-im/metro.git
Add script to automatically deploy the website
Reviewed By: rafeca Differential Revision: D6435717 fbshipit-source-id: dbbf4fed745ac460becc03ca2c4f4ae3a0249314
This commit is contained in:
parent
ec4a0ce527
commit
575142d0c2
28
circle.yml
28
circle.yml
|
@ -10,6 +10,17 @@ aliases:
|
||||||
- node_modules
|
- node_modules
|
||||||
key: dependencies-{{ .Branch }}-{{ checksum "package.json" }}
|
key: dependencies-{{ .Branch }}-{{ checksum "package.json" }}
|
||||||
|
|
||||||
|
- &deploy-website
|
||||||
|
command: |
|
||||||
|
# Deploy Metro website
|
||||||
|
git config --global user.email "metro-bot@users.noreply.github.com"
|
||||||
|
git config --global user.name "Website Deployment Script"
|
||||||
|
echo "machine github.com login metro-bot password $GITHUB_TOKEN" > ~/.netrc
|
||||||
|
# install Docusaurus and generate file of English strings
|
||||||
|
cd website && yarn && yarn run write-translations
|
||||||
|
# build and publish website
|
||||||
|
GIT_USER=metro-bot yarn run publish-gh-pages
|
||||||
|
|
||||||
version: 2
|
version: 2
|
||||||
jobs:
|
jobs:
|
||||||
test-node-9:
|
test-node-9:
|
||||||
|
@ -66,15 +77,28 @@ jobs:
|
||||||
yarn prepare-release
|
yarn prepare-release
|
||||||
npm publish
|
npm publish
|
||||||
yarn cleanup-release
|
yarn cleanup-release
|
||||||
|
test-and-deploy-website:
|
||||||
|
working_directory: ~/metro
|
||||||
|
docker:
|
||||||
|
- image: circleci/node:8
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- restore-cache: *restore-cache
|
||||||
|
- run: |
|
||||||
|
cd website
|
||||||
|
yarn --no-progress
|
||||||
|
- save-cache: *save-cache
|
||||||
|
- deploy: *deploy-website
|
||||||
|
|
||||||
# Workflows enables us to run multiple jobs in parallel
|
# Workflows enables us to run multiple jobs in parallel
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
jobs:
|
jobs:
|
||||||
- test-node-9
|
|
||||||
- test-node-8
|
|
||||||
- test-node-6
|
- test-node-6
|
||||||
|
- test-node-8
|
||||||
|
- test-node-9
|
||||||
|
- test-and-deploy-website
|
||||||
- deploy:
|
- deploy:
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
|
|
Loading…
Reference in New Issue