-
Notifications
You must be signed in to change notification settings - Fork 30
40 lines (38 loc) · 1.09 KB
/
jazzy.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
name: Jazzy
on:
push:
tags:
- v*
jobs:
build:
runs-on: macOS-latest
steps:
- name: Get Version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
- name: Checkout
uses: actions/checkout@v1
- name: Install Jazzy
run: gem install jazzy --user-install
- name: Run Jazzy
run: |
jazzy \
--clean \
--author ddddxxx \
--github_url https://github.com/$GITHUB_REPOSITORY \
--module-version $VERSION \
--module OpenCC \
--output docs
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}
- name: Deploy
run: |
cd docs
git init
git config user.name "CI"
git config user.email "[email protected]"
git remote add secure-origin https://${{ secrets.ACCESS_TOKEN }}@github.com/$GITHUB_REPOSITORY.git
git checkout -b gh-pages
git add .
git commit -m "Updated docs"
git push --force secure-origin gh-pages