79 lines (64 loc) · 2 KB
/
github-pages.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
69
70
71
72
73
74
75
76
77
78
79
name: Build and deploy Jekyll site to GitHub Pages
on:
push:
branches:
- source
jobs:
github-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: source
- uses: actions/checkout@v4
with:
ref: master
path: build
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true
- uses: actions/setup-node@v4
with:
node-version: '16.4.x'
- uses: actions/cache@v3
with:
path: source/vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
- uses: actions/cache@v3
with:
path: source/node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('**/yarn.lock') }}
- name: Bundle install
working-directory: source
run: |
gem install bundler --no-document
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Yarn install
working-directory: source
run: |
yarn install
- uses: yusancky/setup-typst@v2
id: setup-typst
with:
version: 'v0.10.0'
- name: Build resume PDF with Typst
working-directory: source
run: typst compile --root=./ --font-path=assets/fonts/ resume/Resume2023.typ resume.pdf
- name: Jekyll Build
working-directory: source
env:
JEKYLL_ENV: production
run: bundle exec jekyll build -d ../build
- name: Copy resume PDF to build dir
working-directory: source
run: cp resume.pdf ../build/
- name: Commit and push changes to master
working-directory: build
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add .
git commit -m "Update GitHub pages from Jekyll build for commit ${GITHUB_SHA}"
git push origin master