Skip to content

Upload artifacts

Upload artifacts #21

Workflow file for this run

name: Build HTML content from source
on:
pull_request:
branches:
- '*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup bundler cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-bundler-${{ hashFiles('Gemfile.lock') }}
path: .bundle/gems
- name: Setup build cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-build
path: __build
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: Install dependencies
run: |
bundle config set --local path '.bundle/gems'
- name: Build with Middleman
run: |
mkdir -p __build
- 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