-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy-docs.ps1
50 lines (39 loc) · 1.23 KB
/
deploy-docs.ps1
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
<#
# Build and deploy GitHub pages based documentation
# npm run builddocs
#>
try {
rmdir -Path docs/.vuepress/dist -Recurse -Force -ErrorAction "SilentlyContinue"
} catch {
write-host 'docs/.vuepress/dist does not exist'
}
vuepress build docs
cd docs/.vuepress/dist
git init
git checkout -b gh-pages
git add -A
git commit -m 'deploy'
git remote add origin https://github.com/TotallyInformation/node-red-contrib-infocache.git
git branch --set-upstream-to origin/gh-pages
git push -f -u origin gh-pages:gh-pages
cd ../..
<#
# Only run the rest of this ONCE!
# build
npm run builddocs
# navigate into the build output directory
cd docs/.vuepress/dist
# if you are deploying to a custom domain
# echo 'www.example.com' > CNAME
git init
git add -A
git commit -m 'deploy'
# if you are deploying to https://<USERNAME>.github.io
# git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git master
# if you are deploying to https://<USERNAME>.github.io/<REPO>
#git push -f git@github.com:TotallyInformation/node-red-contrib-infocache.git master:gh-pages
git remote add origin https://github.com/TotallyInformation/node-red-contrib-infocache.git
git branch --set-upstream-to origin/gh-pages
git push -f -u origin master:gh-pages
cd ../..
#>