-
Notifications
You must be signed in to change notification settings - Fork 19
45 lines (40 loc) · 1.11 KB
/
premerge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Deploy PR previews
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
workflow_dispatch:
concurrency: preview-${{ github.ref }}
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
pull-requests: write
jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
cache-version: 0 # Increment this number if you need to re-download cached gems
- name: Regenerate templates
run: ./regen.py
- name: Build with Jekyll
run: bundle exec jekyll build --baseurl "/msm/pr-preview/pr-${{github.event.number}}"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./_site/
preview-branch: gh-pages
umbrella-dir: pr-preview