Skip to content

merged changes upstream #1

merged changes upstream

merged changes upstream #1

name: build-preview
run-name: build pull request preview
on:
# run when called from another workflow
workflow_call:
# run if user manually requests it
workflow_dispatch:
# variables
env:
PREVIEWS_FOLDER: preview
permissions:
contents: write
pull-requests: write
jobs:
build-preview:
runs-on: ubuntu-latest
steps:
- name: Debug dump
uses: crazy-max/ghaction-dump-context@v2
- name: Checkout branch contents
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Install Ruby packages
if: github.event.action != 'closed'
<<<<<<< HEAD

Check failure on line 35 in .github/workflows/build-preview.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-preview.yaml

Invalid workflow file

You have an error in your yaml syntax on line 35
uses: ruby/[email protected]
=======
uses: ruby/setup-ruby@v1
>>>>>>> upstream/main
with:
ruby-version: "3.1"
bundler-cache: true
- name: Get Pages url
if: github.event.action != 'closed'
id: pages
uses: actions/configure-pages@v4
- uses: jwalton/gh-find-current-pr@master
if: github.event.action != 'closed'
id: pr
with:
state: all
- name: SSH debug
if: runner.debug == '1'
uses: mxschmitt/action-tmate@v3
- name: Build preview version of site
if: github.event.action != 'closed'
run: |
JEKYLL_ENV=production bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path || '' }}/${{ env.PREVIEWS_FOLDER }}/pr-${{ env.pr }}"
env:
pr: ${{ steps.pr.outputs.pr }}
- name: Commit preview to Pages branch
uses: rossjrw/[email protected]
with:
source-dir: _site
umbrella-dir: ${{ env.PREVIEWS_FOLDER }}