Skip to content

Commit 015cca7

Browse files
committed
Attempt to push to preview repo
1 parent b6d8573 commit 015cca7

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/build.yml

+12-7
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,15 @@ jobs:
3939
- name: Build with Middleman
4040
run: |
4141
mkdir -p __build
42-
BUILD_OUTPUT="__build" bundle exec middleman build
43-
- name: Upload result
44-
uses: actions/upload-artifact@v4
45-
with:
46-
name: build-${{ github.event.number }}
47-
path: '__build/**/*'
48-
retention-days: 30
42+
- name: Setup preview
43+
env:
44+
www_path: 'pr-${{ github.event.number }}'
45+
run: |
46+
mkdir -p __preview
47+
git clone https://github.com/rspec/preview --depth 1 --branch main __preview
48+
mkdir -p '__preview/${{ env.www_path }}'
49+
cp -R __build/ '__preview/${{ env.www_path }}'
50+
cd __preview/
51+
git add '${{ env.www_path }}/*'
52+
git commit -m 'PR build ${{ github.event.number }} - ${{ github.job }}'
53+
git push origin main

0 commit comments

Comments
 (0)