-
Notifications
You must be signed in to change notification settings - Fork 9
68 lines (62 loc) · 1.93 KB
/
build.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Build to GitHub pages
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
branches:
- main
jobs:
build:
runs-on: ubuntu-22.04
steps:
### PREP ###
- name: Checkout repo
uses: actions/checkout@v3
with:
persist-credentials: false # needed for JamesIves/github-pages-deploy-action
### RUBY ###
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.1
- name: Cache Ruby gems
id: cache-gems
uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-1-${{ hashFiles('Gemfile.lock') }}
- name: Set Ruby gems directory
run: bundle config path vendor/bundle
- name: Install Ruby gems
run: bundle install --jobs 4 --retry 3 --deployment
### BUILD ###
- name: Build Jekyll
run: bundle exec rake build
### TEST ###
- name: Cache htmltest files
uses: actions/cache@v3
with:
path: tmp/htmltest
key: htmltest-1
- name: Test built site with htmltest
uses: wjdp/[email protected]
with:
config: .htmltest.yml
### DEPLOY ###
- name: Publish to GH Pages 🚀
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
repository-name: newtheatre/website-gh-pages-master
token: ${{ secrets.DEPLOY_PAT }}
branch: gh-pages # The branch the action should deploy to.
folder: _site # The folder the action should deploy.
clean: true # Automatically remove deleted files from the deploy branch
git-config-name: ntbot
git-config-email: [email protected]
### SUCCESS ###
## TODO: Can we add Telegram notifiers here?