Skip to content

Commit

Permalink
Use DIST_ROOT_DIR environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
xuhdev committed Apr 22, 2024
1 parent 0e64418 commit 1802a8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ on:
pull_request:
branches: ["master"]

env:
DIST_ROOT_DIR: _site/dists/latest

jobs:
build:
name: Build Pages
Expand Down
5 changes: 2 additions & 3 deletions scripts/download_latest_hugo_deb.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash

latest_hugo_version=$(git ls-remote --tags --sort='v:refname' https://github.com/gohugoio/hugo | tail -1 | cut -d '/' -f 3)
PACKAGE_DIR=_site/dists/latest
mkdir -p "${PACKAGE_DIR}/binary-amd64"
wget -q -P "${PACKAGE_DIR}/binary-amd64" "https://github.com/gohugoio/hugo/releases/download/${latest_hugo_version}/hugo_extended_${latest_hugo_version:1}_linux-amd64.deb"
mkdir -p "${DIST_ROOT_DIR}/binary-amd64"
wget -q -P "${DIST_ROOT_DIR}/binary-amd64" "https://github.com/gohugoio/hugo/releases/download/${latest_hugo_version}/hugo_extended_${latest_hugo_version:1}_linux-amd64.deb"

0 comments on commit 1802a8d

Please sign in to comment.