Skip to content

Commit

Permalink
Attempt to push to preview repo
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed Feb 5, 2024
1 parent b6d8573 commit f0957a4
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f0957a4

Please sign in to comment.