Skip to content

Commit 3950700

Browse files
committed
Deploy yard to pages
1 parent 410772c commit 3950700

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
- reopened
1212
paths-ignore:
1313
- ".github/labeler.yml"
14+
- ".github/pages.yml"
1415
- ".github/release.yml"
1516
- ".github/workflows/labeler.yml"
1617
- ".github/workflows/patch_for_go_gem.yml"

.github/workflows/pages.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: Deploy static content to Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches:
8+
- main
9+
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
# Allow one concurrent deployment
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: true
23+
24+
jobs:
25+
# Single deploy job since we're just deploying
26+
deploy:
27+
environment:
28+
name: github-pages
29+
url: ${{ steps.deployment.outputs.page_url }}
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
35+
- uses: ruby/setup-ruby@v1
36+
with:
37+
ruby-version: ruby
38+
bundler-cache: true
39+
40+
- run: bundle exec yard
41+
42+
- name: Setup Pages
43+
uses: actions/configure-pages@v5
44+
- name: Upload artifact
45+
uses: actions/upload-pages-artifact@v3
46+
with:
47+
# Upload entire repository
48+
path: './doc'
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@main
52+
53+
- name: Slack Notification (not success)
54+
uses: act10ns/slack@v2
55+
if: "! success()"
56+
continue-on-error: true
57+
with:
58+
status: ${{ job.status }}
59+
webhook-url: ${{ secrets.SLACK_WEBHOOK }}

0 commit comments

Comments
 (0)