From f0957a40d681163cdd555385d857e8be0dbc5674 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Mon, 5 Feb 2024 22:18:42 +0000 Subject: [PATCH] Attempt to push to preview repo --- .github/workflows/build.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a90e5f29..4d45f126 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,10 +39,15 @@ jobs: - name: Build with Middleman run: | mkdir -p __build - BUILD_OUTPUT="__build" bundle exec middleman build - - name: Upload result - uses: actions/upload-artifact@v4 - with: - name: build-${{ github.event.number }} - path: '__build/**/*' - retention-days: 30 + - name: Setup preview + env: + www_path: 'pr-${{ github.event.number }}' + run: | + mkdir -p __preview + git clone https://github.com/rspec/preview --depth 1 --branch main __preview + mkdir -p '__preview/${{ env.www_path }}' + cp -R __build/ '__preview/${{ env.www_path }}' + cd __preview/ + git add '${{ env.www_path }}/*' + git ci -m 'PR build ${{ github.event.number }} - ${{ github.job }}' + git push origin main