Skip to content

Commit abb0d42

Browse files
committed
πŸ‘·β€β™€οΈ add deploy script
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
1 parent 3a5fccd commit abb0d42

5 files changed

Lines changed: 35 additions & 6 deletions

File tree

β€Ž.gitignoreβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
public
21
tools/contributors/node_modules
32
tools/contributors/contributors.json

β€Ž.gitmodulesβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "public"]
2+
path = public
3+
url = git@github.com:dev-sec/dev-sec.github.io.git
4+
branch = master

β€ŽREADME.mdβ€Ž

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
# dev-sec.io
22

3-
## Installation
3+
## Development and Deployment
44

55
1. Install Hugo [here](https://gohugo.io/getting-started/installing/)
6-
2. Develop via:
7-
```
8-
hugo server
9-
```
6+
2. local development via: `hugo server`
7+
3. deployment via `./deploy.sh`

β€Ždeploy.shβ€Ž

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
# This deploy script is from
4+
# https://gohugo.io/hosting-and-deployment/hosting-on-github/#deployment-via-docs-folder-on-master-branch
5+
6+
echo -e "\033[0;32mDeploying updates to GitHub...\033[0m"
7+
8+
# Build the project.
9+
hugo -t devsec
10+
11+
# Go To Public folder
12+
cd public
13+
# Add changes to git.
14+
git add .
15+
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 ..

β€Žpublicβ€Ž

Submodule public added at 893244d

0 commit comments

Comments
Β (0)