Skip to content

Commit 0154592

Browse files
authored
Adding Travis CI to build site (draft) (#18)
* Adding Travis CI to build site (draft).
1 parent 6bec8c9 commit 0154592

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.travis.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
install:
3+
- curl -LO https://github.com/gohugoio/hugo/releases/download/v0.59.0/hugo_0.59.0_Linux-64bit.deb
4+
- sudo dpkg -i hugo_0.59.0_Linux-64bit.deb
5+
- sudo rm hugo_0.59.0_Linux-64bit.deb
6+
branches:
7+
only:
8+
- master
9+
- /.*/
10+
script:
11+
- chmod +x $TRAVIS_BUILD_DIR/build-site.sh && $TRAVIS_BUILD_DIR/build-site.sh
12+
deploy:
13+
- provider: script
14+
script: chmod +x $TRAVIS_BUILD_DIR/deploy.sh && $TRAVIS_BUILD_DIR/deploy.sh
15+
skip_cleanup: true
16+
on:
17+
branch: master
18+
#notifications:
19+
# irc:
20+
# channels:
21+
# - "chat.freenode.net#selenium"
22+
# on_success: change
23+
# on_failure: always
24+
# template:
25+
# - "%{repository} (%{commit}): %{message}"
26+
# - "Build details: %{build_url}"

deploy.sh

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
echo -e "\033[0;32mDeploying Selenium site to GitHub...\033[0m"
4+
5+
rm -rf site
6+
7+
if [ -n "$GITHUB_AUTH_SECRET" ]
8+
then
9+
touch ~/.git-credentials
10+
chmod 0600 ~/.git-credentials
11+
echo $GITHUB_AUTH_SECRET > ~/.git-credentials
12+
git config credential.helper store
13+
git config user.email "selenium-ci@users.noreply.github.com"
14+
git config user.name "Selenium CI Bot"
15+
fi
16+
17+
git --no-pager branch -a
18+
git status
19+
#git add .
20+
#git commit -m "Publishing on `date`, commit ${TRAVIS_COMMIT} and job ${TRAVIS_JOB_NUMBER}, [skip ci]" || true
21+
#git push --force origin HEAD:master

0 commit comments

Comments
 (0)