We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1eda6f4 + 918907f commit 5d8f615Copy full SHA for 5d8f615
1 file changed
deploy_docs.sh
@@ -3,27 +3,31 @@
3
# Ensure exit codes other than 0 fail the build
4
set -e
5
6
+echo "Removing old local ./doc dir..."
7
+rm -rf ./doc
8
+
9
# Pulling from GitHub
10
echo "Pulling from GitHub..."
11
mkdir -p doc
12
cd doc
13
git init
14
if ! git remote | grep origin; then
15
git remote add origin [email protected]:code-corps/code-corps-api-github-pages.git
- git pull
16
+ git fetch
17
+ git checkout gh-pages
18
fi
19
cd ..
20
21
# Generate docs
22
echo "Generating docs..."
23
mix docs
-cd doc
24
25
# Push to GitHub
26
echo "Pushing to GitHub..."
27
+cd doc
28
git add .
29
git commit -m "Update docs"
-git push -u origin master:gh-pages
30
+git push -u origin gh-pages:gh-pages --force
31
32
# Exit successfully
33
exit 0
0 commit comments