-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (65 loc) · 2.24 KB
/
cd.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
##
# CD using GitHub Actions.
#
# NOTE: GitHub Actions DSL.
# - https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions#understanding-the-workflow-file
# - https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
#
# NOTE: Ruby workflow example.
# - https://github.com/ruby/setup-ruby#usage
#
# NOTE: How to set the working directory for the run directive (working-directory)?
# - https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrunhttps://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
#
# NOTE: How to deploy to GitHub Pages using GitHub Actions?
# - https://github.com/marketplace/actions/github-pages-action
#
name: CD
on:
push:
branches:
- main
jobs:
deploy_api_docs:
runs-on: ubuntu-20.04
name: Deploy API Docs
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
##
# NOTE: Installs the latest compatible Bundler version, runs `bundle install` and caches installed gems.
# - https://github.com/ruby/setup-ruby#usage
# - https://github.com/ruby/setup-ruby#bundler
#
bundler-cache: true
##
# NOTE: Installs Task (task runner).
# - https://taskfile.dev/installation/#github-actions
# - https://github.com/go-task/task
#
- name: Install Task (task runner)
uses: arduino/setup-task@v1
- name: Generate docs
working-directory: ./
run: task docs:generate
- name: Deploy docs to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/api
cname: apidocs.convenientservice.org
create_github_release:
runs-on: ubuntu-20.04
name: Create GitHub Release PR
steps:
- uses: google-github-actions/release-please-action@v3
with:
changelog-path: CHANGELOG.md
default-branch: main
include-v-in-tag: true
package-name: convenient_service
release-type: ruby
version-file: lib/convenient_service/version.rb