mirror of https://gitea.com/gitea/website.git
fix: run hugo directly instead of plugin image (#115)
ref: https://github.com/go-gitea/gitea/pull/22206 Co-authored-by: jolheiser <john.olheiser@gmail.com> Reviewed-on: https://gitea.com/gitea/website/pulls/115 Reviewed-by: techknowlogick <techknowlogick@gitea.io> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: John Olheiser <john+gitea@jolheiser.com> Co-committed-by: John Olheiser <john+gitea@jolheiser.com>
This commit is contained in:
parent
6fbaa1503f
commit
34a438c88a
|
@ -13,9 +13,8 @@ workspace:
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
pull: always
|
pull: always
|
||||||
image: plugins/hugo:latest
|
image: golang:1.19
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache make bash curl
|
|
||||||
- make clean
|
- make clean
|
||||||
- make build
|
- make build
|
||||||
|
|
||||||
|
|
8
Makefile
8
Makefile
|
@ -2,6 +2,8 @@ THEME := themes/gitea
|
||||||
PUBLIC := public
|
PUBLIC := public
|
||||||
ARCHIVE := https://dl.gitea.io/theme/master.tar.gz
|
ARCHIVE := https://dl.gitea.io/theme/master.tar.gz
|
||||||
|
|
||||||
|
HUGO_PACKAGE := github.com/gohugoio/hugo@v0.81.0
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
|
@ -11,15 +13,15 @@ clean:
|
||||||
|
|
||||||
.PHONY: trans-copy
|
.PHONY: trans-copy
|
||||||
trans-copy:
|
trans-copy:
|
||||||
@bash scripts/trans-copy
|
bash scripts/trans-copy.sh
|
||||||
|
|
||||||
.PHONY: server
|
.PHONY: server
|
||||||
server: $(THEME)
|
server: $(THEME)
|
||||||
hugo server
|
go run $(HUGO_PACKAGE) server
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: $(THEME)
|
build: $(THEME)
|
||||||
hugo --cleanDestinationDir
|
go run $(HUGO_PACKAGE) --cleanDestinationDir
|
||||||
|
|
||||||
.PHONY: update
|
.PHONY: update
|
||||||
update: $(THEME)
|
update: $(THEME)
|
||||||
|
|
|
@ -27,7 +27,6 @@ for SOURCE in $(find ${ROOT}/content -type f -iname *.en-us.md); do
|
||||||
DEST="${SOURCE%.en-us.md}.${LOCALE}.md"
|
DEST="${SOURCE%.en-us.md}.${LOCALE}.md"
|
||||||
|
|
||||||
if [[ ! -f ${DEST} ]]; then
|
if [[ ! -f ${DEST} ]]; then
|
||||||
echo "Creating fallback for ${DEST#${ROOT}/content/}"
|
|
||||||
cp ${SOURCE} ${DEST}
|
cp ${SOURCE} ${DEST}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
Loading…
Reference in New Issue