Skip to content

Commit 1881f2a

Browse files
committed
Add a Makefile to deploy
1 parent 0fd0649 commit 1881f2a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
default: deploy
2+
3+
.PHONY: deploy-check-git
4+
.ONESHELL:
5+
.SHELLFLAGS: -e
6+
check-git:
7+
test "$$(git branch --show-current)" == "main"
8+
test -z "$$(git status --porcelain)"
9+
10+
.PHONY: deploy-github
11+
deploy-github: check-git
12+
git push origin
13+
14+
.PHONY: deploy-gitlab
15+
deploy-gitlab: check-git
16+
git push gitlab
17+
18+
.PHONY: deploy
19+
deploy: deploy-github deploy-gitlab

0 commit comments

Comments
 (0)