forked from marccampbell/hugo-linkcheck-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (35 loc) · 960 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
IMAGE_NAME=hugo-linkcheck
DOCKER_REPO=marc
.PHONY: lint
`npm bin`/tslint --project ./tsconfig.json --fix
.PHONY: deps
deps:
npm install
.PHONY: prebuild
prebuild:
rm -rf build
mkdir -p build
.PHONY: build
build: prebuild
npm run tsc
chmod +x ./build/hugo-linkcheck-action.js
.PHONY: run
run:
node --no-deprecation ./build/hugo-linkcheck-action.js
.PHONY: test
test: deps build
npm test
.PHONE: docker-build
docker-build:
docker build -t $(IMAGE_NAME) .
.PHONY: docker-tag
docker-tag:
tag $(IMAGE_NAME) $(DOCKER_REPO)/$(IMAGE_NAME) --no-latest --no-sha
.PHONY: docker-publish
docker-publish:
docker push $(DOCKER_REPO)/$(IMAGE_NAME)
.PHONY: test-docker
test-docker:
docker build -t hugo-linkcheck-action:test .
docker run -e HUGO_CONFIG=./config.toml -e HUGO_ROOT=. -e HUGO_STARTUP_WAIT=5 -v `pwd`/test-site:/github/workspace --workdir /github/workspace hugo-linkcheck-action:test
@echo "There should be 1 broken link in the test above"