Skip to content

Commit 0cab3f7

Browse files
authored
Add a new GH workflow for deploying to GH pages (#938)
1 parent c41f460 commit 0cab3f7

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/gh-pages.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Deploy IRB 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/irb' && !startsWith(github.event_name, 'pull') }}
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
- name: Setup Ruby
25+
uses: ruby/setup-ruby@1198b074305f9356bd56dd4b311757cc0dab2f1c # v1.175.1
26+
with:
27+
ruby-version: "3.3"
28+
bundler-cache: true
29+
- name: Setup Pages
30+
id: pages
31+
uses: actions/configure-pages@v5
32+
- name: Build with IRB
33+
# Outputs to the './_site' directory by default
34+
run: bundle exec rake rdoc
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v3
37+
38+
deploy:
39+
environment:
40+
name: github-pages
41+
url: ${{ steps.deployment.outputs.page_url }}
42+
runs-on: ubuntu-latest
43+
needs: build
44+
steps:
45+
- name: Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)