Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload artifacts #195

Open
wants to merge 2 commits into
base: source
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +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: Generate HTML Preview
id: html_preview
uses: pavi2410/html-preview-action@v2
with:
html_file: '__build/index.html'
- name: Access preview
run: echo "${{steps.html_preview.outputs.url}}"
- 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