mirror of
https://github.com/huhu/rust-search-extension
synced 2024-11-16 00:17:57 +00:00
33 lines
No EOL
690 B
Bash
Executable file
33 lines
No EOL
690 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
BRANCH="now"
|
|
|
|
build() {
|
|
echo "Starting building..."
|
|
|
|
cd docs
|
|
sudo snap install --edge zola
|
|
zola build
|
|
mv public /tmp/public
|
|
cd ..
|
|
}
|
|
|
|
deploy() {
|
|
echo "Starting deploying..."
|
|
git config --global url."https://".insteadOf git://
|
|
git config --global url."https://github.com/".insteadOf git@github.com:
|
|
|
|
git checkout ${BRANCH}
|
|
cp -vr /tmp/public/* .
|
|
git config user.name "GitHub Actions"
|
|
git config user.email "github-actions-bot@users.noreply.github.com"
|
|
git add .
|
|
git commit -m "Deploy new version docs"
|
|
git push --force "https://${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" ${BRANCH}
|
|
|
|
echo "Deploy complete"
|
|
}
|
|
|
|
build
|
|
deploy |