forked from graphql-compose/graphql-compose.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
58 lines (54 loc) · 1.57 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
version: 2
jobs:
deploy-website:
working_directory: ~/graphql-compose
docker:
- image: circleci/node:8.10
steps:
- checkout
- restore_cache:
keys:
- website-node-modules-{{ checksum "website/yarn.lock" }}
- website-node-modules-
- run:
name: Install node_modules
command: |
cd website
yarn --no-progress
- run:
name: Install crowdin
command: |
sudo apt-get update
sudo apt-get install openjdk-7-jre
wget https://artifacts.crowdin.com/repo/deb/crowdin.deb -O crowdin.deb
sudo dpkg -i crowdin.deb
- run:
name: Install apt packages
command: |
sudo apt install rsync
- save_cache:
key: website-node-modules-{{ checksum "website/yarn.lock" }}
paths:
- website/node_modules
- deploy:
name: Publish gh-pages
command: |
git config --global user.email "nodkz@users.noreply.github.com"
git config --global user.name "Pavel Chertorogov"
echo "machine github.com login nodkz password $GITHUB_TOKEN" > ~/.netrc
cd website
yarn install
yarn write-translations && yarn crowdin-upload && yarn crowdin-download
GIT_USER=nodkz yarn publish-gh-pages
workflows:
version: 2
build_and_deploy:
jobs:
- deploy-website:
filters:
branches:
only: source
general:
branches:
ignore:
- master