Skip to content

Commit 4ebc061

Browse files
committed
Attempt to push to preview repo
1 parent b6d8573 commit 4ebc061

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/build.yml

+13-8
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,19 @@ jobs:
3535
- name: Install dependencies
3636
run: |
3737
bundle config set --local path '.bundle/gems'
38-
bundle install
3938
- name: Build with Middleman
4039
run: |
4140
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
41+
- name: Setup preview
42+
env:
43+
www_path: 'pr-${{ github.event.number }}'
44+
run: |
45+
mkdir -p __preview
46+
git clone https://github.com/rspec/preview --depth 1 --branch main __preview
47+
mkdir -p '__preview/${{ env.www_path }}'
48+
cp -R __build/ '__preview/${{ env.www_path }}'
49+
cd __preview/
50+
git add '${{ env.www_path }}/*'
51+
git config user.name "RSpec Bot 9000"
52+
git commit -m 'PR build ${{ github.event.number }} - ${{ github.job }}'
53+
git push origin main

0 commit comments

Comments
 (0)