diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 4aab62cc..90e6dd56 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -72,11 +72,16 @@ jobs: - name: Get Zotero Version Information id: zoteroVersion run: | - VERSION=$(curl -sI "https://api.zotero.org/groups/2914042/items?format=versions" \ + set -euo pipefail + VERSION=$(curl -fsSLI "https://api.zotero.org/groups/2914042/items?format=versions" \ | grep -i "last-modified-version" \ | cut -d: -f2 \ - | tr -d '\r ' ) - echo "version=$VERSION" >> $GITHUB_OUTPUT + | tr -d $'\r ' ) + if [[ -z "${VERSION:-}" ]]; then + echo "Error: Failed to determine Zotero Last-Modified-Version from API response." >&2 + exit 1 + fi + echo "version=$VERSION" >> "$GITHUB_OUTPUT" - name: Cache Zotero Bibliography id: cache-zotero @@ -172,8 +177,7 @@ jobs: - name: Install dependencies run: | - npm install -g autoprefixer postcss-cli - npm install + npm ci - name: Build env: @@ -197,5 +201,5 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v5