stagit4github

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit c6c0d077666dc5bc296147c7d52bb3f121b2fd65
parent 1ce334c3ed3299e73c5d655a619ede88841fc892
Author: minerva-jupiter <ryouturn@gmail.com>
Date:   Wed,  9 Sep 2026 04:06:25 +0900

ci(workflows): fix repository cloning and stagit build paths

Use absolute paths for repository cloning and HTML output generation in the stagit-build workflow to ensure correct execution context.

Diffstat:
M.github/workflows/stagit-build.yml | 23+++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/stagit-build.yml b/.github/workflows/stagit-build.yml @@ -29,7 +29,7 @@ jobs: - name: Clone All Repositories & Build Static Files env: - GH_TOKEN: ${{ secrets.PORTAL_PAT }} + GH_TOKEN: ${{ secrets.PORTAL_PAT }} run: | git config --global url."https://x-access-token:${GH_TOKEN}@github.com/".insteadOf "https://github.com/" @@ -40,17 +40,24 @@ jobs: [ -z "$url" ] && continue repo_name=$(basename "$url" .git) - git clone --bare "$url" "repositories/${repo_name}.git" + repo_path="${ROOT_DIR}/repositories/${repo_name}.git" + site_path="${ROOT_DIR}/html/${repo_name}" - mkdir -p "html/${repo_name}" - cd "repositories/${repo_name}.git" - stagit "${ROOT_DIR}/html/${repo_name}" - cd "${ROOT_DIR}" + git clone --bare "$url" "$repo_path" + + mkdir -p "$site_path" + + # リポジトリディレクトリの中で stagit を実行し、出力先を絶対パスで指定 + cd "$repo_path" + stagit "$site_path" + cd "$ROOT_DIR" done - cd repositories + # ルート目録(index.html)の生成 + cd "${ROOT_DIR}/repositories" stagit-index *.git > "${ROOT_DIR}/html/index.html" - + cd "$ROOT_DIR" + - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@main with: