forked from plotly/documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
100 lines (91 loc) · 4.16 KB
/
config.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
version: 2
jobs:
build:
branches:
ignore:
- gh-pages
docker:
# a packaged system that has the instructions for creating a running container.
- image: circleci/ruby:2.3.3
# actions that need to be taken to perform your job
steps:
- add_ssh_keys:
fingerprints:
- "SHA256:USaw9IC3qDmo5lTDeDE1ctu2VeLlrFbqhYZrPVJlw2U"
- "c0:90:93:c0:d1:79:9e:d6:14:2e:0f:30:77:1a:83:04"
- restore_cache:
keys:
- source-v1- #one time, not every time!
# checks out the source code for a job over SSH
- checkout
- save_cache:
key: source-v1-1 # Sept 7, 2019
paths:
- ".git"
- restore_cache:
keys:
- gem-cache-v1-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
- gem-cache-v1-{{ arch }}-{{ .Branch }}
- gem-cache-v1
- run:
name: install dependencies
command: bundle install --path vendor/bundle
- save_cache:
key: gem-cache-v1-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
- run:
name: deployment
command: |
git config --global user.email "[email protected]"
git config --global user.name "Deployer"
rm -rf _posts/python/html
git clone -b built [email protected]:plotly/plotly.py-docs _posts/python/html
bundle exec jekyll build
mkdir snapshots
cd _site
cp -r 'all_static' '../snapshots'
cp 'index.html' '../snapshots'
cp --parents 'python/index.html' '../snapshots'
cp --parents 'python/getting-started/index.html' '../snapshots'
cp --parents 'python/plotly-fundamentals/index.html' '../snapshots'
cp --parents 'python/line-and-scatter/index.html' '../snapshots'
cp --parents 'r/index.html' '../snapshots'
cp --parents 'r/getting-started/index.html' '../snapshots'
cp --parents 'r/plotly-fundamentals/index.html' '../snapshots'
cp --parents 'r/line-and-scatter/index.html' '../snapshots'
cp --parents 'javascript/index.html' '../snapshots'
cp --parents 'javascript/plotly-fundamentals/index.html' '../snapshots'
cp --parents 'javascript/getting-started/index.html' '../snapshots'
cp --parents 'javascript/line-and-scatter/index.html' '../snapshots'
cp --parents 'ggplot2/index.html' '../snapshots'
cp --parents 'ggplot2/getting-started/index.html' '../snapshots'
cp --parents 'ggplot2/geom_abline/index.html' '../snapshots'
cp --parents 'matplotlib/index.html' '../snapshots'
cp --parents 'matplotlib/getting-started/index.html' '../snapshots'
cp --parents 'matplotlib/plot/index.html' '../snapshots'
cp --parents 'python/v3/index.html' '../snapshots'
cp --parents 'python/v3/plotly-fundamentals/index.html' '../snapshots'
cp --parents 'python/v3/getting-started/index.html' '../snapshots'
cp --parents 'python/v3/line-and-scatter/index.html' '../snapshots'
cp --parents 'matlab/index.html' '../snapshots'
cp --parents 'matlab/getting-started/index.html' '../snapshots'
cp --parents 'matlab/graphing-multiple-chart-types/index.html' '../snapshots'
cp --parents 'matlab/scatter/index.html' '../snapshots'
cd ..
rm -f 'snapshots/all_static/javascripts/jquery-knob/index.html'
rm -f 'snapshots/all_static/images/Plotly-feed2.html'
rm -f 'snapshots/all_static/images/Plotly.html'
rm -f 'snapshots/all_static/images/Plotly-Feed.html'
percy snapshot snapshots --enable_javascript
rm -rf 'snapshots/'
if [ "${CIRCLE_BRANCH}" == "source-design-merge" ]; then
git checkout gh-pages
git pull origin gh-pages
cp -r _site/* .
rm -rf _site/
touch .nojekyll
git add .
git commit -m "deploying"
git push origin gh-pages
fi