Skip to content

Commit

Permalink
ci: use hugo modules
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris committed Oct 5, 2020
1 parent 4a0607f commit ec99358
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
8 changes: 6 additions & 2 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit ec99358

Please sign in to comment.