Repository navigation
83 lines (71 loc) · 2.04 KB
/
Copy pathdocs.yml
File metadata and controls
83 lines (71 loc) · 2.04 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Docs
on:
push:
branches:
- main
paths:
- "docs/**"
- "lib/**"
- "README.md"
- "CHANGELOG.md"
- "CODE_OF_CONDUCT.md"
- "LICENSE.txt"
- ".yardopts"
- "scripts/install_docs_branding.rb"
- "Gemfile"
- "Gemfile.lock"
- "mammoth.gemspec"
- ".github/workflows/docs.yml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build documentation
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out repository
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "4.0.5"
bundler-cache: true
- name: Build YARD documentation
run: bundle exec yard doc --no-private --output-dir public
- name: Install documentation branding
run: ruby scripts/install_docs_branding.rb public
- name: Verify documentation output
run: |
test -f public/index.html
test -f public/file.README.html
test -f public/favicon.ico
test -f public/mammoth-social-preview-1280x640.png
test -f public/mammoth-primary-horizontal-light.png
grep -q 'property="og:image"' public/index.html
grep -q 'name="twitter:card"' public/index.html
grep -q 'srcset="mammoth-primary-horizontal-light.png"' public/index.html
! grep -q 'mammoth-primary-horizontal-reversed-transparent.png' public/index.html
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v5
with:
path: public
deploy:
name: Deploy documentation
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy GitHub Pages
id: deployment
uses: actions/deploy-pages@v5