From 99979b118006e20bbc864aee2022b3cb2b991f13 Mon Sep 17 00:00:00 2001 From: Raul Victor Trombin Date: Mon, 6 Nov 2023 15:08:25 -0300 Subject: [PATCH] github: action: docs: Copy and keep other folders --- .github/workflows/action.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index a9dbbbbfdb..35c9d8ca68 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -36,6 +36,20 @@ jobs: run: cargo doc - name: Move documentation run: mkdir -p pages/doc && mv target/doc/* pages/doc/ + - name: Get previous benchmark data + if: ${{ github.ref == 'refs/heads/master' }} + run: | + echo "Fetching gh-pages branch" + git fetch origin gh-pages + + echo "Checking out gh-pages branch" + git checkout gh-pages + + echo "Copying data file from gh-pages to cache" + mkdir -p pages/dev && cp -r dev/* pages/dev/ || { echo "Failed to copy dev folder" ; exit 1; } + + echo "Checking out current previous branch" + git checkout - - name: Deploy uses: peaceiris/actions-gh-pages@v3 if: ${{ github.ref == 'refs/heads/master' }}