Skip to content

Commit 0bde408

Browse files
committed
add snapshots
1 parent 0d9451d commit 0bde408

File tree

2 files changed

+39
-35
lines changed

2 files changed

+39
-35
lines changed

.circleci/config.yml

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -80,41 +80,6 @@ jobs:
8080
bundle exec jekyll build
8181
cp python/sitemap.xml _site/python/sitemap.xml
8282
rm _data/mapbox_token.yml
83-
mkdir snapshots
84-
cd _site
85-
cp -r 'all_static' '../snapshots'
86-
cp 'api/index.html' '../snapshots'
87-
cp --parents 'python/index.html' '../snapshots'
88-
cp --parents 'python/getting-started/index.html' '../snapshots'
89-
cp --parents 'python/plotly-fundamentals/index.html' '../snapshots'
90-
cp --parents 'python/line-and-scatter/index.html' '../snapshots'
91-
cp --parents 'r/index.html' '../snapshots'
92-
cp --parents 'r/getting-started/index.html' '../snapshots'
93-
cp --parents 'r/plotly-fundamentals/index.html' '../snapshots'
94-
cp --parents 'r/line-and-scatter/index.html' '../snapshots'
95-
cp --parents 'javascript/index.html' '../snapshots'
96-
cp --parents 'javascript/plotly-fundamentals/index.html' '../snapshots'
97-
cp --parents 'javascript/getting-started/index.html' '../snapshots'
98-
cp --parents 'javascript/line-and-scatter/index.html' '../snapshots'
99-
cp --parents 'ggplot2/index.html' '../snapshots'
100-
cp --parents 'ggplot2/getting-started/index.html' '../snapshots'
101-
cp --parents 'ggplot2/histograms/index.html' '../snapshots'
102-
cp --parents 'matlab/index.html' '../snapshots'
103-
cp --parents 'matlab/getting-started/index.html' '../snapshots'
104-
cp --parents 'matlab/graphing-multiple-chart-types/index.html' '../snapshots'
105-
cp --parents 'matlab/histograms/index.html' '../snapshots'
106-
cp --parents 'csharp/index.html' '../snapshots'
107-
cp --parents 'csharp/getting-started/index.html' '../snapshots'
108-
cd ..
109-
rm -f 'snapshots/all_static/javascripts/jquery-knob/index.html'
110-
rm -f 'snapshots/all_static/images/Plotly-feed2.html'
111-
rm -f 'snapshots/all_static/images/Plotly.html'
112-
rm -f 'snapshots/all_static/images/Plotly-Feed.html'
113-
rm -f snapshots/*.bkp
114-
rm -f snapshots/*/*.bkp
115-
rm -f snapshots/*/*/*.bkp
116-
bundle exec percy snapshot snapshots --enable_javascript
117-
rm -rf 'snapshots/'
11883
if [ "${CIRCLE_BRANCH}" == "master" ]; then
11984
git clone --depth=1 --branch=gh-pages https://github.com/plotly/documentation.git
12085
git config user.name plotlydocbot

.github/workflows/build.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,45 @@ jobs:
5656
bundle exec jekyll build
5757
cp python/sitemap.xml _site/python/sitemap.xml
5858
59+
- name: Create Percy snapshots
60+
run: |
61+
mkdir snapshots
62+
cd _site
63+
cp -r 'all_static' '../snapshots'
64+
cp 'api/index.html' '../snapshots'
65+
cp --parents 'python/index.html' '../snapshots'
66+
cp --parents 'python/getting-started/index.html' '../snapshots'
67+
cp --parents 'python/plotly-fundamentals/index.html' '../snapshots'
68+
cp --parents 'python/line-and-scatter/index.html' '../snapshots'
69+
cp --parents 'r/index.html' '../snapshots'
70+
cp --parents 'r/getting-started/index.html' '../snapshots'
71+
cp --parents 'r/plotly-fundamentals/index.html' '../snapshots'
72+
cp --parents 'r/line-and-scatter/index.html' '../snapshots'
73+
cp --parents 'javascript/index.html' '../snapshots'
74+
cp --parents 'javascript/plotly-fundamentals/index.html' '../snapshots'
75+
cp --parents 'javascript/getting-started/index.html' '../snapshots'
76+
cp --parents 'javascript/line-and-scatter/index.html' '../snapshots'
77+
cp --parents 'ggplot2/index.html' '../snapshots'
78+
cp --parents 'ggplot2/getting-started/index.html' '../snapshots'
79+
cp --parents 'ggplot2/histograms/index.html' '../snapshots'
80+
cp --parents 'matlab/index.html' '../snapshots'
81+
cp --parents 'matlab/getting-started/index.html' '../snapshots'
82+
cp --parents 'matlab/graphing-multiple-chart-types/index.html' '../snapshots'
83+
cp --parents 'matlab/histograms/index.html' '../snapshots'
84+
cp --parents 'csharp/index.html' '../snapshots'
85+
cp --parents 'csharp/getting-started/index.html' '../snapshots'
86+
cd ..
87+
rm -f 'snapshots/all_static/javascripts/jquery-knob/index.html'
88+
rm -f 'snapshots/all_static/images/Plotly-feed2.html'
89+
rm -f 'snapshots/all_static/images/Plotly.html'
90+
rm -f 'snapshots/all_static/images/Plotly-Feed.html'
91+
rm -f snapshots/*.bkp snapshots/*/*.bkp snapshots/*/*/*.bkp
92+
93+
- name: Percy snapshot
94+
run: bundle exec percy snapshot snapshots --enable_javascript
95+
env:
96+
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
97+
5998
- name: Zip site
6099
run: zip -r site-build-github-actions.zip _site/
61100

0 commit comments

Comments
 (0)