-
Notifications
You must be signed in to change notification settings - Fork 16
38 lines (38 loc) · 971 Bytes
/
docs.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
name: Docs
on:
workflow_dispatch:
push:
paths:
- 'docs/**'
pull_request:
paths:
- 'docs/**'
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
path: ${{ github.ref_name }}
- uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
- name: Prepare Ruby and Jekyll
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: Build deps and website
run: |
cd ${{ github.ref_name }}/docs/ \
&& bundle install && bundle exec jekyll build
- name: Copy file
run: |
mkdir -p ./gh-pages/${{ github.ref_name }}/ \
&& cp -pr ${{ github.ref_name }}/docs/_site/* ./gh-pages/${{ github.ref_name }}/
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./gh-pages