Skip to content

Adding Travis CI to build site #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
install:
- curl -LO https://github.com/gohugoio/hugo/releases/download/v0.59.0/hugo_0.59.0_Linux-64bit.deb
- sudo dpkg -i hugo_0.59.0_Linux-64bit.deb
- sudo rm hugo_0.59.0_Linux-64bit.deb
branches:
only:
- master
- /.*/
script:
- chmod +x $TRAVIS_BUILD_DIR/build-site.sh && $TRAVIS_BUILD_DIR/build-site.sh
deploy:
- provider: script
script: chmod +x $TRAVIS_BUILD_DIR/deploy.sh && $TRAVIS_BUILD_DIR/deploy.sh
skip_cleanup: true
on:
branch: master
#notifications:
# irc:
# channels:
# - "chat.freenode.net#selenium"
# on_success: change
# on_failure: always
# template:
# - "%{repository} (%{commit}): %{message}"
# - "Build details: %{build_url}"
21 changes: 21 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

echo -e "\033[0;32mDeploying Selenium site to GitHub...\033[0m"

rm -rf site

if [ -n "$GITHUB_AUTH_SECRET" ]
then
touch ~/.git-credentials
chmod 0600 ~/.git-credentials
echo $GITHUB_AUTH_SECRET > ~/.git-credentials
git config credential.helper store
git config user.email "selenium-ci@users.noreply.github.com"
git config user.name "Selenium CI Bot"
fi

git --no-pager branch -a
git status
#git add .
#git commit -m "Publishing on `date`, commit ${TRAVIS_COMMIT} and job ${TRAVIS_JOB_NUMBER}, [skip ci]" || true
#git push --force origin HEAD:master