-
-
Notifications
You must be signed in to change notification settings - Fork 60
63 lines (49 loc) · 1.67 KB
/
publish-docs.yml
File metadata and controls
63 lines (49 loc) · 1.67 KB
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
name: Publish docs
on:
workflow_dispatch:
workflow_call:
permissions: {}
concurrency:
group: publish-docs-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
publish_docs:
name: Publish docs from main
runs-on: ubuntu-latest
environment: release
permissions:
contents: read
pages: write # Publish documentation to pages
id-token: write # Publish documentation to pages
steps:
- name: Harden the runner
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- id: rubygems
run: |
ruby -e \
'print "version=", Gem::Specification.load(ARGV[0]).rubygems_version, "\n"' \
diff-lcs.gemspec >>"${GITHUB_OUTPUT}"
- uses: ruby/setup-ruby@09a7688d3b55cf0e976497ff046b70949eeaccfd # v1.288.0
with:
bundler-cache: false
ruby-version: ruby
- name: Install dependencies
run: |
gem update --system="${RUBYGEMS_VERSION}"
bundle install --jobs 4 --retry 3
env:
RUBYGEMS_VERSION: ${{ steps.rubygems.outputs.version }}
- name: Build documentation
run: |
rake docs
- name: Upload documentation artifact
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
with:
path: doc
- name: Deploy documentation
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0