Skip to content

Commit

Permalink
Add PR preview utilizing Github Actions (#413)
Browse files Browse the repository at this point in the history
* Add pr-preview-action

* Fix custom-url
  • Loading branch information
justanwar authored Aug 28, 2024
1 parent fbcd2a2 commit b80d419
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Preview on GH Pages

on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed

concurrency: preview-${{ github.ref }}

jobs:
ci:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: false
- name: Get PR preview path
run: echo "PREVIEW_PATH=pr-preview/pr-${{ github.event.number }}" >> "$GITHUB_ENV"
- name: install bundler
run: gem install bundler
- name: bundle install
run: bundle install
- name: build website
run: bundle exec jekyll build --baseurl /firo-site/"$PREVIEW_PATH"
- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: _site
custom-url: firoorg.github.io/firo-site

0 comments on commit b80d419

Please sign in to comment.