File tree Expand file tree Collapse file tree 3 files changed +32
-4
lines changed
Expand file tree Collapse file tree 3 files changed +32
-4
lines changed Original file line number Diff line number Diff line change 1+ name : Setup Hugo
2+ description : Setup Hugo manually while waiting for peaceiris/actions-hugo to support deploy releases
3+
4+ inputs :
5+ hugo-version :
6+ description : ' Version of Hugo to install'
7+ required : true
8+
9+ runs :
10+ using : ' composite'
11+ steps :
12+ - name : Install and setup Hugo
13+ shell : bash
14+ run : |
15+ base_url="https://github.com/gohugoio/hugo/releases/download"
16+
17+ version="${{ inputs.hugo-version }}"
18+ archive_url="${base_url}/v${version}/hugo_extended_withdeploy_${version}_linux-amd64.tar.gz"
19+
20+ workdir="$HOME/hugo"
21+ bindir="$workdir/bin"
22+ tmpdir="$workdir/tmp"
23+
24+ mkdir -p {"$bindir","$tmpdir"}
25+
26+ curl --fail --location --show-error --silent --output "$tmpdir/hugo.tar.gz" "$archive_url"
27+ tar xvzf "$tmpdir/hugo.tar.gz" -C "$bindir"
28+ rm -r "$tmpdir"
29+
30+ echo "$bindir" >> $GITHUB_PATH
Original file line number Diff line number Diff line change 4242 cache : ' npm'
4343
4444 - name : Setup Hugo
45- uses : peaceiris/ actions-hugo@v3
45+ uses : ./.github/ actions/setup -hugo
4646 with :
4747 hugo-version : ' 0.142.0'
48- extended : true
4948
5049 - name : Prepare project
5150 run : ./bin/entrypoint.sh prepare
Original file line number Diff line number Diff line change 4747 # no cache
4848
4949 - name : Setup Hugo
50- uses : peaceiris/ actions-hugo@v3
50+ uses : ./.github/ actions/setup -hugo
5151 with :
5252 hugo-version : ' 0.142.0'
53- extended : true
5453
5554 - name : Prepare project
5655 run : ./bin/entrypoint.sh prepare
You can’t perform that action at this time.
0 commit comments