-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (39 loc) · 939 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
BUILD_DIR := out
DOMAIN_NAME := pp.mathieularose.com
GIT_PUBLISH_REPO := https://actions:$(GITHUB_TOKEN)@github.com/$(GITHUB_REPOSITORY)
GIT_PUBLISH_BRANCH := gh-pages
.PHONY: build
build:
npx next build && npx next export
.PHONY: dev
dev:
npx next dev
.PHONY: fix
fix:
npx npx eslint . --ext js,ts,tsx --fix
.PHONY: install
install:
npm ci
npx next telemetry disable
.PHONY: publish
publish:
echo -n $(DOMAIN_NAME) > $(BUILD_DIR)/CNAME
touch $(BUILD_DIR)/.nojekyll
cd $(BUILD_DIR) && \
git init && \
git config user.email "actions@users.noreply.github.com" && \
git config user.name "GitHub Actions" && \
git add . && \
git commit --allow-empty-message -m "" && \
git push -f $(GIT_PUBLISH_REPO) HEAD:$(GIT_PUBLISH_BRANCH)
.PHONY: start
start:
npx next start
.PHONY: test
test: test.eslint test.types
.PHONY: test.eslint
test.eslint:
npx npx eslint . --ext js,ts,tsx
.PHONY: test.types
test.types:
npx tsc