OSDN Git Service

[fix] : Add files will be commited
authorhayao <hayao@fascode.net>
Sun, 24 Oct 2021 11:54:54 +0000 (20:54 +0900)
committerhayao <hayao@fascode.net>
Sun, 24 Oct 2021 11:54:54 +0000 (20:54 +0900)
.github/workflows/hugo.yaml

index b0668cc..7e88fd7 100644 (file)
@@ -80,7 +80,9 @@ jobs:
           git config remote.origin.url "git@github.com:hayao0819/hayao0819.github.io.git"
           echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
           rm -rf ./blog/src/themes
-          git rm --cached -r *
+          git clone --depth=1 --single-branch --branch gh-pages git@github.com:hayao0819/hayao.fascode.net.git /home/runner/actions_github_${GITHUB_ACTION}
+          git rm -r --ignore-unmatch *
+          cp -r /home/runner/actions_github_${GITHUB_ACTION}/* ./
           git add -A
           if ! git diff --cached --quiet; then
             git commit -m "deploy: ${GITHUB_SHA}" -a