Skip to content

Commit 6e26138

Browse files
committed
Merge branch 'master' of github.com:evilUrge/shellgems
2 parents 875f578 + 21ea012 commit 6e26138

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+9769
-30
lines changed

.circleci/config.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,13 @@ jobs:
1616
command: export NODE_ENV=production
1717

1818
- checkout
19-
- run: sudo apt-get install hugo
20-
- run: git submodule update --init
21-
- run: cp static/favicon.png themes/terminal/static/img/favicon/red.png
19+
# Install the latest version of Hugo
20+
- run: cd ~ ; sudo curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep browser_download_url | grep Linux-64bit.deb | grep -v extended | cut -d '"' -f 4 | wget -i -
21+
- run: cd ~ ; sudo dpkg -i hugo*_Linux-64bit.deb
22+
# Generate static version of the blog
2223
- run: hugo
23-
- run: npm install --production
24-
25-
# decode gpg
26-
- run: echo "$GIT_CRYPT_KEY" | base64 -D > git-crypt.key
27-
2824
# deploy
25+
- run: npm install --production
2926
- run: node deploy.js
3027

3128

.firebase-token

Lines changed: 0 additions & 1 deletion
This file was deleted.

.git-crypt/.gitattributes

Lines changed: 0 additions & 4 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.

.gitattributes

Lines changed: 0 additions & 2 deletions
This file was deleted.

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ShellGems_
2+
---
3+
My personal blog + a deploy script (and pipeline) via circleCI
4+
5+
Latest build: [![CircleCI](https://circleci.com/gh/evilUrge/shellgems.svg?style=svg)](https://circleci.com/gh/evilUrge/shellgems)
6+
7+
## DAFUQ going on here
8+
My blog is based on Hugo static page generator -> hence all the posts and pages are in markdown format.
9+
10+
#### This repoestory includes:
11+
* All my pages (in MD).
12+
* A slightly modified theme ([hugo-terminal](https://github.com/panr/hugo-theme-terminal)).
13+
* Firebase deploy script _deploy.js_.
14+
* CircleCI definition yaml.
15+
16+

config.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ paginate = 5
55

66
[params]
77
contentTypeName = "posts"
8-
# ["orange", "blue", "red", "green", "pink"]
98
themeColor = "red"
9+
fullWidthTheme = false
10+
centerTheme = false
1011

1112
[languages]
1213
[languages.en]

deploy.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
const fs = require('fs');
2-
const token = fs.readFileSync(`${__dirname}/.firebase-token`);
3-
const projectName = (JSON.parse(fs.readFileSync(`${__dirname}/.firebaserc`, 'utf8'))).projects[process.env.NODE_ENV ? process.env.NODE_ENV : 'default'];
2+
const token = process.env['FIREBASE_TOKEN']; // Keep your firebase cli token in FIREBASE_TOKEN as a env param
3+
const projectName = (JSON.parse(fs.readFileSync(`${__dirname}/.firebaserc`, 'utf8')))
4+
.projects[process.env.NODE_ENV ? process.env.NODE_ENV : 'default'];
5+
46
/**
57
* FireBase Deployment script
68
* FOR CI USE ONLY!
79
*/
810

911
console.log('Deploying to Firebase... please wait.');
10-
11-
require('firebase-tools')
12-
.deploy((() => ({project: projectName, token: token, cwd: __dirname}))())
13-
.then(() => console.log(`Your project ${projectName} has been deployed`))
14-
.catch((err) => console.warn(`error has occurred! - ${err}`));
12+
token ? require('firebase-tools')
13+
.deploy((() => ({project: projectName, token: token, cwd: __dirname}))())
14+
.then(() => console.log(`Your project ${projectName} has been deployed`))
15+
.catch((err) => console.warn(`error has occurred! - ${err}`))
16+
: console.error('waitt...where is your firebase token?');

0 commit comments

Comments
 (0)