Skip to content

Commit 5297a0a

Browse files
committed
[GitHub Actions] Use install_hugo.sh
1 parent 6c3b62e commit 5297a0a

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

.github/workflows/sync_translations_to_master.yml

+5-12
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,17 @@ jobs:
3535
git add -A
3636
timestamp=$(date -u)
3737
git commit -m "[Sync: translations->master]: ${timestamp}" || exit 0
38+
- name: Install Hugo
39+
run: . ./master/.ci/install_hugo.sh
3840
- name: Test build changes to master branch
39-
env:
40-
HUGO_VERSION: '0.71.1'
41-
HUGO_IMAGE: 'ext-alpine'
41+
working-directory: "./master"
4242
run: |
43-
site_repo_dir="${GITHUB_WORKSPACE}/master"
44-
label="${HUGO_VERSION}-${HUGO_IMAGE}"
45-
echo "Using klakegg/hugo:${label}"
4643
# Set up output directory
4744
OUTPUT_DIR="${HOME}/output/tmp/public"
4845
echo "OUTPUT_DIR=${OUTPUT_DIR}"
4946
mkdir -p "${OUTPUT_DIR}"
50-
# Run test Hugo build
51-
docker run --rm -t \
52-
-v ${site_repo_dir}:/src \
53-
-v ${OUTPUT_DIR}:/target \
54-
klakegg/hugo:${label} \
55-
--minify --i18n-warnings --gc --path-warnings --verbose
47+
# Run Hugo build
48+
hugo --minify --i18n-warnings --gc --path-warnings --verbose --destination "${OUTPUT_DIR}"
5649
- name: Push changes to master branch
5750
env:
5851
GITHUB_ACTOR: ${{ secrets.WZ2100_PUSH_USERNAME }}

0 commit comments

Comments
 (0)