Skip to content

Commit 379f6f5

Browse files
committed
Add GitHub Actions workflow for deploying Racc documentation to GitHub Pages
This PR will allow you to review Racc's documentation in the following GH pages: https://ruby.github.io/racc/ ### Motivations Currently, the Racc documentation is available below, but does not appear to be maintained. Also, there appears to be no way to check it on the web. https://github.com/ruby/racc/blob/213e7edd6e60631b2b126008378c8ce61783d4b4/doc We would like to deploy the documentation to GitHub pages so that people can view the Racc documentation on the web. ### Future work Currently, we would like to organize and provide documentation on the web for the docs under docs.
1 parent 1e36baf commit 379f6f5

3 files changed

Lines changed: 48 additions & 2 deletions

File tree

.github/workflows/gh-pages.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deploy Racc documentation to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
if: ${{ github.repository == 'ruby/racc' && !startsWith(github.event_name, 'pull') }}
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
- name: Setup Ruby
25+
uses: ruby/setup-ruby@f26937343756480a8cb3ae1f623b9c8d89ed6984 # v1.196.0
26+
with:
27+
ruby-version: "3.4"
28+
bundler-cache: true
29+
- name: Setup Pages
30+
id: pages
31+
uses: actions/configure-pages@v5
32+
- name: Build with Racc
33+
run: bundle exec rake docs
34+
- name: Upload artifact
35+
uses: actions/upload-pages-artifact@v3
36+
37+
deploy:
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
runs-on: ubuntu-latest
42+
needs: build
43+
steps:
44+
- name: Deploy to GitHub Pages
45+
id: deployment
46+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ target
1111
lib/java/racc/cparse-jruby.jar
1212
lib/racc/cparse-jruby.jar
1313
Gemfile.lock
14-
html
14+
_site/

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ RDoc::Task.new(:docs) do |rd|
1313
})
1414

1515
title = "#{spec.name}-#{spec.version} Documentation"
16-
1716
rd.options << "-t #{title}"
17+
rd.rdoc_dir = "_site"
1818
end
1919

2020
def java?

0 commit comments

Comments
 (0)