-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathnetlify.toml
27 lines (26 loc) · 1.01 KB
/
netlify.toml
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
[build]
command = """
mkdocs build
git config user.name "Version Deployment"
git config user.email "[email protected]"
git remote set-url origin https://${GITHUB_TOKEN}@github.com/SirEndii/Advanced-Peripherals-Documentation.git
git config pull.rebase true
git switch gh-pages
git pull origin gh-pages
git switch ${BRANCH}
echo "Trying to deploy $BRANCH ..."
if [ "$BRANCH" = "0.8" ]; then
echo "Deploying $BRANCH"
mike deploy --push --update-aliases --ignore-remote-status --allow-empty 0.8 canary
elif [ "$BRANCH" = "0.7" ]; then
echo "Deploying $BRANCH"
mike deploy --push --update-aliases --ignore-remote-status --allow-empty 0.7 latest
else
echo "Deploying $BRANCH"
mike deploy --push --ignore-remote-status --allow-empty "$BRANCH"
fi
"""
publish = "site" # The directory where your built MkDocs site resides
[context.deploy-preview]
command = "mkdocs build" #build the preview, but don't deploy with mike.
publish = "site"