From c980f0978e8b7fb566dab2d5b5e119949a435bb8 Mon Sep 17 00:00:00 2001 From: Alessandro Senese Date: Thu, 21 Mar 2024 12:01:49 +0000 Subject: [PATCH] pull before push --- .github/workflows/doc.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index e366ee4..251980d 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -17,16 +17,21 @@ jobs: run: | cd docs rm -rf build - yarn install --frozen-lockfile --non-interactive - yarn build cd build git init git branch -M main - git remote add origin https://github.com/ceceppa/anima-doc.git git config user.name "GitHub Actions Bot" git config user.email "" + git remote add origin https://github.com/ceceppa/anima-doc.git + + git pull origin main + rm -rf * + + yarn install --frozen-lockfile --non-interactive + yarn build + git add . - git commit -m "Documentation" - git remote set-url --push origin https://ceceppa:${{ secrets.TOKEN }}@github.com/ceceppa/anima-doc.git + git commit -m "Update docs" + git push -f origin main