-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (63 loc) · 1.96 KB
/
docs.yml
File metadata and controls
73 lines (63 loc) · 1.96 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
name: Documentation
on:
push:
branches: [main]
paths:
- "lib/**"
- "README.md"
- ".github/workflows/docs.yml"
pull_request:
paths:
- "lib/**"
- "README.md"
jobs:
validate-docs:
name: Validate Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1.310.0
with:
ruby-version: "3.1"
bundler-cache: true
- name: Install YARD for documentation
run: gem install yard
- name: Generate API documentation
run: yard doc --no-output --fail-on-warning
- name: Check README links
uses: tcort/github-action-markdown-link-check@v1
with:
use-quiet-mode: "yes"
use-verbose-mode: "yes"
config-file: ".github/markdown-link-check.json"
- name: Validate code examples in README
run: |
echo "Extracting and testing Ruby code examples from README..."
# Extract Ruby code blocks and test basic syntax
grep -A 20 '```ruby' README.md | grep -v '```' | ruby -c
update-changelog:
name: Update Changelog
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Generate changelog
uses: mikepenz/release-changelog-builder-action@v6
with:
configuration: ".github/changelog_config.json"
outputFile: "CHANGELOG.md"
fromTag: ""
toTag: "HEAD"
- name: Commit changelog
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add CHANGELOG.md
git diff --staged --quiet || git commit -m "docs: update changelog"
git push