From ec9935846afea7c2791bd7c20a49d2f7c75f707c Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Mon, 5 Oct 2020 17:51:18 +0900 Subject: [PATCH] ci: use hugo modules --- .github/workflows/test.yml | 2 +- README.md | 2 +- scripts/setup.sh | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 04a574bb9..bdebcae27 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -87,6 +87,6 @@ jobs: cd ~ mkdir ./homepage wget https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/master/scripts/setup.sh - bash ./setup.sh ./homepage + bash ./setup.sh ./homepage "peaceiris" cd ./homepage hugo diff --git a/README.md b/README.md index 1eb22e97e..0f0b94247 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ Here is [the setup script](./scripts/setup.sh). ```sh mkdir ./homepage wget https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/master/scripts/setup.sh -bash ./setup.sh ./homepage +bash ./setup.sh ./homepage "your_github_id" cd ./homepage hugo server ``` diff --git a/scripts/setup.sh b/scripts/setup.sh index cc602971f..2ace03022 100644 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -5,7 +5,11 @@ set -eu -o pipefail # -x: is for debugging cd $1 git init -git submodule add https://github.com/peaceiris/hugo-theme-iris.git ./themes/hugo-theme-iris -cp -r ./themes/hugo-theme-iris/exampleSite/{config,content,data,scripts,static,go.mod,go.sum} . +wget https://github.com/peaceiris/hugo-theme-iris/archive/master.zip +rm master.zip +cp -r ./hugo-theme-iris-master/exampleSite/{config,content,data,scripts,static} . +rm -rf hugo-theme-iris-master +hugo mod init "github.com/$2/$1" +hugo mod get -u github.com/peaceiris/hugo-theme-iris git add . git commit -m "Add hugo-theme-iris"