-
-
Notifications
You must be signed in to change notification settings - Fork 4
47 lines (40 loc) · 1.12 KB
/
documentation.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
name: Documentation
on:
release:
types: [published]
push:
branches: [main]
jobs:
deploy_docs:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
# runs 'bundle install' and caches installed gems automatically
bundler-cache: true
- name: Generate Documentation
run: |
sed -i.bak "s/title:\(.*\)/title:\1 (${{ github.ref_name }})/g" .jazzy.yaml
bundle exec jazzy
- name: Fix Invalid URLs
run: |
cd docs
touch .nojekyll
- name: Commit files
run: |
cd docs
git init
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Deploying updated Jazzy documentation"
- name: Push changes
uses: ad-m/github-push-action@master
with:
directory: docs
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
force: true