forked from dojo/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgh-pages-publish.sh
More file actions
executable file
·71 lines (58 loc) · 2.13 KB
/
gh-pages-publish.sh
File metadata and controls
executable file
·71 lines (58 loc) · 2.13 KB
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
#!/bin/bash
function buildProject {
export PROJECT_DIR=$@
./scripts/install.sh
cd $PROJECT_DIR
npm run build:ghpages
cd ..
}
if [ "$PROJECT_DIR" = "auto-deploy" ]
then
declare -r SSH_FILE="$(mktemp -u $HOME/.ssh/XXXXX)"
openssl aes-256-cbc -K $encrypted_5db33ae36efe_key -iv $encrypted_5db33ae36efe_iv -in "id_rsa.enc" -out "$SSH_FILE" -d
chmod 600 "$SSH_FILE" && printf "%s\n" "Host github.com" " IdentityFile $SSH_FILE" " LogLevel ERROR" >> ~/.ssh/config
buildProject "todo-mvc"
buildProject "todo-mvc-kitchensink"
buildProject "widget-showcase"
buildProject "custom-element-menu"
buildProject "custom-element-showcase"
buildProject "realworld"
buildProject "world-clock"
buildProject "intersection-observer"
buildProject "resize-observer"
buildProject "dgrid-wrapper"
export PROJECT_DIR="auto-deploy"
git checkout -B gh-pages
mkdir samples
mkdir samples/todo-mvc
mkdir samples/todo-mvc-kitchensink
mkdir samples/widget-showcase
mkdir samples/custom-element-menu
mkdir samples/custom-element-showcase
mkdir samples/realworld
mkdir samples/world-clock
mkdir samples/intersection-observer
mkdir samples/resize-observer
mkdir samples/dgrid-wrapper
cp index.html samples/index.html
touch samples/.nojekyll
cp -r todo-mvc/output/dist/* samples/todo-mvc/
cp -r todo-mvc-kitchensink/output/dist/* samples/todo-mvc-kitchensink
cp -r widget-showcase/output/dist/* samples/widget-showcase
cp -r custom-element-menu/output/dist/* samples/custom-element-menu
cp -r custom-element-showcase/dist/* samples/custom-element-showcase
cp -r realworld/output/dist/* samples/realworld
cp -r world-clock/output/dist/* samples/world-clock
cp -r intersection-observer/output/dist/* samples/intersection-observer
cp -r resize-observer/output/dist/* samples/resize-observer
cp -r dgrid-wrapper/output/dist/* samples/dgrid-wrapper
touch samples/dgrid-wrapper/.nojekyll
git remote add ssh-remote git@github.com:dojo/examples.git
git add -f samples
git commit -am "built example"
git filter-branch -f --prune-empty --subdirectory-filter samples
git push -f ssh-remote gh-pages
git checkout -
else
echo "only deploy during auto deploy matrix"
fi