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 4ebc061
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,19 @@ jobs:
- name: Install dependencies
run: |
bundle config set --local path '.bundle/gems'
bundle install
- 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 config user.name "RSpec Bot 9000"
git commit -m 'PR build ${{ github.event.number }} - ${{ github.job }}'
git push origin main

0 comments on commit 4ebc061

Please sign in to comment.