Skip to content

Commit ce176db

Browse files
committed
automate daily re-deploy
Signed-off-by: Kent Rancourt <[email protected]>
1 parent d0d8e61 commit ce176db

File tree

5 files changed

+65
-0
lines changed

5 files changed

+65
-0
lines changed

.brigade/brigade.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { events } from "@brigadecore/brigadier"
2+
import axios from "axios"
3+
4+
events.on("brigade.sh/cron", "daily-redeploy", async event => {
5+
await axios.post(event.project.secrets.deployHookURL)
6+
})
7+
8+
events.process()

.brigade/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "brigade-blog",
3+
"dependencies": {
4+
"@brigadecore/brigadier": "^2.3.1",
5+
"axios": "^0.26.1"
6+
}
7+
}

.brigade/project.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# yaml-language-server: $schema=https://schemas.brigade.sh/schemas-v2/project.json
2+
apiVersion: brigade.sh/v2
3+
kind: Project
4+
metadata:
5+
id: brigade-blog
6+
description: Automated daily re-deploy of the blog
7+
spec:
8+
eventSubscriptions:
9+
- source: brigade.sh/cron
10+
types:
11+
- daily-redeploy
12+
workerTemplate:
13+
git:
14+
cloneURL: https://github.com/brigadecore/blog.git

.brigade/yarn.lock

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+
5+
"@brigadecore/brigadier@^2.3.1":
6+
version "2.3.1"
7+
resolved "https://registry.yarnpkg.com/@brigadecore/brigadier/-/brigadier-2.3.1.tgz#fe59e76a1908500c862e9ad0c413eb709aac2bc6"
8+
integrity sha512-Nd+obE/iY23aKsCD/FvtqkbdrZsanOfW7z69Z7LRvds71iQrh2JcCXcZLkMed5TfwR2f03VVycIH0cA1CBwE3g==
9+
dependencies:
10+
"@types/node" "^16.10.3"
11+
typescript "4.4.3"
12+
13+
"@types/node@^16.10.3":
14+
version "16.11.27"
15+
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.27.tgz#5da19383bdbeda99bc0d09cfbb88cab7297ebc51"
16+
integrity sha512-C1pD3kgLoZ56Uuy5lhfOxie4aZlA3UMGLX9rXteq4WitEZH6Rl80mwactt9QG0w0gLFlN/kLBTFnGXtDVWvWQw==
17+
18+
axios@^0.26.1:
19+
version "0.26.1"
20+
resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.1.tgz#1ede41c51fcf51bbbd6fd43669caaa4f0495aaa9"
21+
integrity sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==
22+
dependencies:
23+
follow-redirects "^1.14.8"
24+
25+
follow-redirects@^1.14.8:
26+
version "1.14.9"
27+
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7"
28+
integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==
29+
30+
31+
version "4.4.3"
32+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.3.tgz#bdc5407caa2b109efd4f82fe130656f977a29324"
33+
integrity sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ resources/
2222
# Link checker artifacts
2323
bin/
2424
tmp/
25+
26+
.brigade/secrets.yaml
27+
.brigade/node_modules/

0 commit comments

Comments
 (0)