From 9252a91c4e3a71d5ac60a322c7d1c94a3c954a3c Mon Sep 17 00:00:00 2001 From: Zhang Fuxin Date: Sun, 31 Oct 2021 23:34:15 +0800 Subject: [PATCH] Fix workflow: 1. add sudo to commmands. 2. explicitly set LC_ALl to zh_CN.UTF-8. I am not sure whether the env: setting in a step can be passed down. --- .github/workflows/deploy_bookdown.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy_bookdown.yml b/.github/workflows/deploy_bookdown.yml index 82261a7..5ed346c 100644 --- a/.github/workflows/deploy_bookdown.yml +++ b/.github/workflows/deploy_bookdown.yml @@ -27,16 +27,15 @@ jobs: run: sudo apt-get install -y fonts-noto-cjk - name: setup locale run: | - apt-get install -y locales - sed -i -e 's/# zh_CN.UTF-8 UTF-8/zh_CN.UTF-8 UTF-8/' /etc/locale.gen && locale-gen + sudo apt-get install -y locales + sudo sed -i -e 's/# zh_CN.UTF-8 UTF-8/zh_CN.UTF-8 UTF-8/' /etc/locale.gen + sudo locale-gen shell: bash - env: - LC_ALL: zh_CN.UTF-8 - uses: foxsen/actions/setup-tinytex-new@tinytex-v2 with: cache-version: 6 - name: Render Book - run: export PATH=$PATH:$HOME/bin; make -j8 + run: export PATH=$PATH:$HOME/bin; export LC_ALL=zh_CN.UTF-8; make -j8 shell: bash - uses: actions/upload-artifact@v1 with: