Skip to content

Commit 1518530

Browse files
authored
add preview (#251)
1 parent fd3b0af commit 1518530

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed

.github/workflows/jekyll.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: "Setup PHP"
3838
uses: shivammathur/setup-php@v2
3939
with:
40-
php-version: 8.4}
40+
php-version: 8.4
4141

4242
- name: "Update FanArt"
4343
run: |

.github/workflows/preview.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deploy PR previews
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
- closed
10+
11+
concurrency: preview-${{ github.ref }}
12+
13+
jobs:
14+
deploy-preview:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: "Setup PHP"
24+
uses: shivammathur/setup-php@v2
25+
with:
26+
php-version: 8.4
27+
28+
- name: "Update FanArt"
29+
run: |
30+
php updateData.php
31+
32+
- name: Setup Ruby
33+
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4
34+
with:
35+
ruby-version: '3.1'
36+
bundler-cache: true
37+
cache-version: 0
38+
39+
- name: Setup Pages
40+
id: pages
41+
uses: actions/configure-pages@v5
42+
43+
- name: Build with Jekyll
44+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
45+
env:
46+
JEKYLL_ENV: production
47+
48+
- name: Upload artifact
49+
uses: actions/upload-pages-artifact@v3
50+
51+
- name: Deploy preview
52+
uses: rossjrw/pr-preview-action@v1
53+
with:
54+
preview-branch: master
55+
source-dir: ./_site/
56+
action: auto

0 commit comments

Comments
 (0)