-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add PR preview utilizing Github Actions (#413)
* Add pr-preview-action * Fix custom-url
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|