-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (40 loc) · 1.28 KB
/
Deploy.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: Build and Deploy
on:
push:
branches:
- master
pull_request_target:
types: [opened, synchronize]
branches:
- master
env:
GH_USERNAME: "BioJulia"
PREVIEWS_PREFIX: "previews/PR" # will be followed by PR number
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v3
- name: 👀 Set preview path for PRs
run: |
echo 'PRID=${{ env.PREVIEWS_PREFIX}}${{ github.event.number}}' >> $GITHUB_ENV
if: github.event_name == 'pull_request_target'
shell: bash
- name: 🚀 Build and Deploy
uses: tlienart/xranklin-build-action@main
with:
SITE_FOLDER: "./"
BASE_URL_PREFIX: ${{ env.REPO_PREFIX }}
PREVIEW: ${{ env.PRID }}
# PYTHON_LIBS: "pandas ansi2html"
# GNUPLOT: false
# LUNR: true
- name: 🗒️ Preview URL indication for PRs
uses: thollander/actions-comment-pull-request@v2
with:
message: |
Preview should be up in a couple of mins at
https://${{ env.GH_USERNAME }}.github.io/${{ env.REPO_PREFIX }}/${{ env.PRID }}
(if you get a 404, wait 30s then refresh).
if: github.event_name == 'pull_request_target'