Skip to content
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
tools/contributors/node_modules
tools/contributors/contributors.json
/public
/deployment
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
install:
- wget -O /tmp/hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.52/hugo_0.52_Linux-64bit.deb
- sudo dpkg -i /tmp/hugo.deb

script:
- hugo -t devsec

deploy:
- provider: script
script: ./deploy.sh
skip_cleanup: true
on:
branch: src
35 changes: 15 additions & 20 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
#!/bin/bash

# This deploy script is from
# https://gohugo.io/hosting-and-deployment/hosting-on-github/#deployment-via-docs-folder-on-master-branch
set -e

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

# Build the project.
hugo -t devsec
echo $GITHUB_AUTH_SECRET > ~/.git-credentials && chmod 0600 ~/.git-credentials
git config --global credential.helper store
git config --global user.email "artem-bot@users.noreply.github.com"
git config --global user.name "Artems Bot"
git config --global push.default simple

# Go To Public folder
cd public
# Add changes to git.
git add .
rm -rf deployment
git clone -b master https://github.com/dev-sec/dev-sec.github.io.git deployment
rsync -av --delete --exclude ".git" public/ deployment
cd deployment
git add -A
git commit -m "rebuilding site on `date`, commit ${TRAVIS_COMMIT} and job ${TRAVIS_JOB_NUMBER}" || true
git push

# Commit changes.
msg="rebuilding site `date`"
if [ $# -eq 1 ]
then msg="$1"
fi
git commit -m "$msg"

# Push source and build repos.
git push origin master

# Come Back up to the Project Root
cd ..
cd ..
rm -rf deployment
1 change: 0 additions & 1 deletion public
Submodule public deleted from ee9a7c
1 change: 1 addition & 0 deletions static/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dev-sec.io