File tree Expand file tree Collapse file tree 6 files changed +32
-25
lines changed Expand file tree Collapse file tree 6 files changed +32
-25
lines changed Original file line number Diff line number Diff line change 1
1
tools /contributors /node_modules
2
2
tools /contributors /contributors.json
3
+ /public
4
+ /deployment
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ ---
2
+ install :
3
+ - wget -O /tmp/hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.52/hugo_0.52_Linux-64bit.deb
4
+ - sudo dpkg -i /tmp/hugo.deb
5
+
6
+ script :
7
+ - hugo -t devsec
8
+
9
+ deploy :
10
+ - provider : script
11
+ script : ./deploy.sh
12
+ skip_cleanup : true
13
+ on :
14
+ branch : src
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- # This deploy script is from
4
- # https://gohugo.io/hosting-and-deployment/hosting-on-github/#deployment-via-docs-folder-on-master-branch
3
+ set -e
5
4
6
5
echo -e " \033[0;32mDeploying updates to GitHub...\033[0m"
7
6
8
- # Build the project.
9
- hugo -t devsec
7
+ echo $GITHUB_AUTH_SECRET > ~ /.git-credentials && chmod 0600 ~ /.git-credentials
8
+ git config --global credential.helper store
9
+ git config --global user.email
" [email protected] "
10
+ git config --global user.name " Artems Bot"
11
+ git config --global push.default simple
10
12
11
- # Go To Public folder
12
- cd public
13
- # Add changes to git.
14
- git add .
13
+ rm -rf deployment
14
+ git clone -b master https://github.com/dev-sec/dev-sec.github.io.git deployment
15
+ rsync -av --delete --exclude " .git" public/ deployment
16
+ cd deployment
17
+ git add -A
18
+ git commit -m " rebuilding site on ` date` , commit ${TRAVIS_COMMIT} and job ${TRAVIS_JOB_NUMBER} " || true
19
+ git push
15
20
16
- # Commit changes.
17
- msg=" rebuilding site ` date` "
18
- if [ $# -eq 1 ]
19
- then msg=" $1 "
20
- fi
21
- git commit -m " $msg "
22
-
23
- # Push source and build repos.
24
- git push origin master
25
-
26
- # Come Back up to the Project Root
27
- cd ..
21
+ cd ..
22
+ rm -rf deployment
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ dev-sec.io
You can’t perform that action at this time.
0 commit comments