Skip to content

Commit 0374e58

Browse files
committed
fix not caching
1 parent 5655b5d commit 0374e58

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

.github/workflows/generate-cache.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,16 @@ jobs:
104104

105105
- name: Push cache to cache-data branch
106106
run: |
107-
git config --global user.name "github-actions"
108-
git config --global user.email "github-actions@github.com"
109-
git fetch origin cache-data || true
110-
git checkout -B cache-data origin/cache-data || git checkout --orphan cache-data
111-
rm -rf *
112-
cp -r _site/* .
113-
git add .
114-
git commit -m "Update cache $(date -u)" || echo "No changes to commit"
115-
git push origin cache-data
107+
cd trease-backend/cache
108+
git init
109+
git config --global user.name "github-actions"
110+
git config --global user.email "github-actions@github.com"
111+
git remote add origin https://github.com/${{ github.repository }}.git || true
112+
git fetch origin cache-data || true
113+
git checkout -B cache-data || git checkout --orphan cache-data
114+
git add .
115+
git commit -m "Update cache $(date -u)" || echo "No changes to commit"
116+
git push --force origin cache-data
116117
env:
117118
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
118119

0 commit comments

Comments
 (0)