-
-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (46 loc) · 1.38 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
name: Build and deploy Jekyll site to GitHub Pages
on:
push:
paths:
- "docs/**"
branches:
- 1.x
jobs:
github-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: 💎 setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: 🔨 setup node
uses: actions/setup-node@v2
with:
node-version: "14"
- name: 🔨 install Yarn and dependecies
working-directory: ./docs
run: |
npm install -g yarn
yarn install
- name: 🔨 move node_modules and configs to root
run: |
cp -r ./docs/node_modules ./node_modules
cp ./docs/postcss.config.js ./postcss.config.js
cp ./docs/tailwind.config.js ./tailwind.config.js
- name: 🔨 install dependencies & build site
uses: limjh16/jekyll-action-ts@v2
with:
enable_cache: true
jekyll_src: ./docs
custom_opts: "--trace"
- name: 🚀 deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./_site
exclude_assets: ".github,package.json,yarn.lock,postcss.config.js,tailwind.config.js"
- name: 🔨 uninstall Yarn
if: always()
run: npm uninstall -g yarn