Simplify the GitHub repo cache setup and add it to the GitHub action

This commit is contained in:
Bjørn Erik Pedersen committed 2023-10-29 13:49:13 +01:00
1 parent d81c51704d
commit 25ce337c71
4 files changed
+71 -107

No files matched your search

+3 -2
View File
@@ -10,6 +10,7 @@ jobs:
runs-on: ubuntu-latest
env:
HUGO_CACHEDIR: /tmp/hugo_cache
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
@@ -19,11 +20,11 @@ jobs:
shell: bash
working-directory: ./cmd/hugothemesitebuilder
run: |
go run main.go build -configOnly
cd build
git config --global user.email "bep@users.noreply.github.com"
git config --global user.name "bep"
go install github.com/gohugoio/hugo@${{ env.HUGO_VERSION }}
go run main.go build -skipSiteBuild -cleanCache
cd build
hugo mod get
hugo mod tidy
git add .