-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (49 loc) · 1.6 KB
/
dev-preview.yml
File metadata and controls
59 lines (49 loc) · 1.6 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Dev Preview Build (PR)
on:
pull_request:
branches: [ main ]
permissions:
contents: read
pull-requests: write
concurrency:
group: pages-dev-preview-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set TPEN_ENV=dev
run: echo "TPEN_ENV=dev" >> $GITHUB_ENV
- name: Generate runtime env file (dev)
run: echo "window.TPEN_ENV='dev'" > config.env.js
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
- name: Install Jekyll and dependencies
run: |
gem install bundler jekyll
gem install jekyll-theme-modernist
gem install jekyll-redirect-from
- name: Build with Jekyll
env:
TPEN_ENV: dev
run: jekyll build --source ./ --destination ./_site
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v3.0
with:
publish-dir: './_site'
production-deploy: false
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from PR #${{ github.event.pull_request.number }}"
enable-pull-request-comment: true
enable-commit-comment: false
overwrites-pull-request-comment: true
github-deployment-environment: ''
github-deployment-description: ''
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 5