-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
207e6c5
commit 2643ea7
Showing
1 changed file
with
24 additions
and
21 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 |
---|---|---|
@@ -1,29 +1,32 @@ | ||
name: Preview GitHub Pages | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
push: | ||
branches-ignore: | ||
- main # or master, depending on your default branch name | ||
|
||
jobs: | ||
build-and-deploy-preview: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.0' | ||
|
||
- name: Install dependencies | ||
run: | | ||
gem install bundler | ||
bundle install | ||
- name: Build site | ||
run: bundle exec jekyll build | ||
|
||
- name: Deploy preview | ||
uses: rossjrw/pr-preview-action@v1 | ||
with: | ||
source-dir: ./_site/ | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "3.0" | ||
|
||
- name: Install dependencies | ||
run: | | ||
gem install bundler | ||
bundle install | ||
- name: Build site | ||
run: bundle exec jekyll build | ||
|
||
- name: Deploy preview | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./_site | ||
destination_dir: preview/${{ github.ref_name }} |