generated from appscodelabs/govanityurls
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
16 changed files
with
251 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"projects": { | ||
"default": "appscode-govanityurls" | ||
}, | ||
"targets": { | ||
"appscode-govanityurls": { | ||
"hosting": { | ||
"hugo": [ | ||
"searchlight-govanityurls" | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version = 1 | ||
|
||
[merge] | ||
method = "squash" # default: "merge" | ||
delete_branch_on_merge = true # default: false | ||
optimistic_updates = true # default: true | ||
prioritize_ready_to_merge = true # default: false | ||
|
||
[merge.message] | ||
title = "pull_request_title" # default: "github_default" | ||
body = "github_default" # default: "github_default" | ||
strip_html_comments = true # default: false | ||
|
||
[update] | ||
always = true # default: false | ||
|
||
[approve] | ||
auto_approve_usernames = ["1gtm", "tamalsaha"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: preview-website | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
submodules: true | ||
|
||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install Hugo | ||
run: | | ||
curl -fsSL -o hugo_extended.deb https://github.com/gohugoio/hugo/releases/download/v0.111.1/hugo_extended_0.111.1_linux-amd64.deb | ||
sudo dpkg -i hugo_extended.deb | ||
rm hugo_extended.deb | ||
- name: Generate Website | ||
run: | | ||
make gen | ||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: '${{ secrets.GITHUB_TOKEN }}' | ||
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_APPSCODE_GOVANIURLS }}' | ||
expires: 1d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
submodules: true | ||
|
||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install Hugo | ||
run: | | ||
curl -fsSL -o hugo_extended.deb https://github.com/gohugoio/hugo/releases/download/v0.111.1/hugo_extended_0.111.1_linux-amd64.deb | ||
sudo dpkg -i hugo_extended.deb | ||
rm hugo_extended.deb | ||
- name: Install Firebase CLI | ||
run: | | ||
npm i -g firebase-tools | ||
- name: Generate Website | ||
run: | | ||
make gen | ||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: '${{ secrets.GITHUB_TOKEN }}' | ||
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_APPSCODE_GOVANIURLS }}' | ||
channelId: live |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/.firebase | ||
/content/docs | ||
/node_modules | ||
/repos | ||
/resources | ||
.sass-cache | ||
/public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "themes/govanity"] | ||
path = themes/govanity | ||
url = https://github.com/appscodelabs/hugo-theme-govanity.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.PHONY: run | ||
run: | ||
hugo server | ||
|
||
.PHONY: gen | ||
gen: | ||
rm -rf public | ||
hugo --minify | ||
|
||
.PHONY: release | ||
release: gen | ||
firebase use default | ||
firebase deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# govanityurls | ||
|
||
## Create Hugo Project | ||
|
||
```bash | ||
hugo new site govanityurls | ||
cd govanityurls | ||
git init | ||
git submodule add https://github.com/appscodelabs/hugo-theme-govanity.git themes/govanity | ||
echo theme = \"govanity\" >> config.toml | ||
``` | ||
|
||
## Firebase Configuration | ||
|
||
- https://firebase.google.com/docs/hosting/multisites | ||
- https://github.com/FirebaseExtended/action-hosting-deploy#options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: "{{ replace .Name "-" " " | title }}" | ||
date: {{ .Date }} | ||
draft: true | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
baseURL = 'http://example.org/' | ||
languageCode = 'en-us' | ||
title = 'GO Vanity URL Website' | ||
theme = 'govanity' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
host: go.opscenter.dev | ||
|
||
paths: | ||
/inbox-agent: | ||
repo: https://github.com/ops-center/inbox-agent | ||
/installer: | ||
repo: https://github.com/ops-center/installer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"hosting": { | ||
"target": "hugo", | ||
"public": "public", | ||
"ignore": [ | ||
"firebase.json", | ||
"**/.*", | ||
"**/node_modules/**" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
projects=( \ | ||
appscode \ | ||
bytebuilders \ | ||
gomodules \ | ||
kmodules \ | ||
kubedb \ | ||
kubeform \ | ||
kubeguard \ | ||
kubeops \ | ||
kubepack \ | ||
kubeshield \ | ||
kubevault \ | ||
open-viz \ | ||
pharmer \ | ||
searchlight \ | ||
stashed \ | ||
voyagermesh \ | ||
wandrs \ | ||
) | ||
|
||
firebase use default | ||
for p in "${projects[@]}"; do | ||
firebase hosting:sites:create $p-govanityurls | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
projects=( \ | ||
appscode \ | ||
bytebuilders \ | ||
gomodules \ | ||
kmodules \ | ||
kubedb \ | ||
kubeform \ | ||
kubeguard \ | ||
kubeops \ | ||
kubepack \ | ||
kubeshield \ | ||
kubevault \ | ||
open-viz \ | ||
pharmer \ | ||
searchlight \ | ||
stashed \ | ||
voyagermesh \ | ||
wandrs \ | ||
) | ||
|
||
gsa=$(cat /personal/AppsCode/credentials/[email protected]) | ||
gh secret set FIREBASE_SERVICE_ACCOUNT_APPSCODE_GOVANIURLS -b"${gsa}" -R appscodelabs/govanityurls | ||
|
||
for p in "${projects[@]}"; do | ||
gh repo create -y --public --template=appscodelabs/govanityurls $p/govanityurls | ||
gh secret set FIREBASE_SERVICE_ACCOUNT_APPSCODE_GOVANIURLS -b"${gsa}" -R $p/govanityurls | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
projects=( \ | ||
appscode \ | ||
bytebuilders \ | ||
gomodules \ | ||
kmodules \ | ||
kubedb \ | ||
kubeform \ | ||
kubeguard \ | ||
kubeops \ | ||
kubepack \ | ||
kubeshield \ | ||
kubevault \ | ||
open-viz \ | ||
pharmer \ | ||
searchlight \ | ||
stashed \ | ||
voyagermesh \ | ||
wandrs \ | ||
) | ||
|
||
for p in "${projects[@]}"; do | ||
gh secret remove -o $p GOVANITYURLS_SERVICE_ACCOUNT_JSON_KEY | ||
done |