Skip to content

Commit 6026c66

Browse files
authored
Automate GitHub Pages build with GitHub Actions (#70)
* Create gh-pages.yml Powered by peaceiris/actions-gh-pages ref. https://github.com/peaceiris/actions-gh-pages * main branch is now default * Update gh-pages.yml * Add Netlify badge
1 parent 7cccf7f commit 6026c66

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

.github/workflows/gh-pages.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: GitHub Pages Deploy
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
gh-pages-deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Set up Ruby
12+
uses: ruby/setup-ruby@v1
13+
with:
14+
ruby-version: 3.0
15+
bundler-cache: true
16+
- name: Jekyll Build
17+
run: bundle exec jekyll build
18+
- name: Deploy
19+
uses: peaceiris/actions-gh-pages@v3
20+
with:
21+
personal_token: ${{ secrets.GITHUB_TOKEN }}
22+
publish_dir: ./_site

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# [railsdoc.github.io](https://railsdoc.github.io/)
22

3-
[![Build Status](https://travis-ci.com/railsdoc/railsdoc.github.io.svg?branch=page-source)](https://travis-ci.com/railsdoc/railsdoc.github.io)
3+
[![Build Status](https://travis-ci.com/railsdoc/railsdoc.github.io.svg?branch=main)](https://travis-ci.com/railsdoc/railsdoc.github.io)
4+
[![Netlify Status](https://api.netlify.com/api/v1/badges/c964029a-6d5a-4f3a-95e9-d35830a2fe83/deploy-status)](https://app.netlify.com/sites/railsdoc-preview/deploys)
45

56
railsdoc.github.io is yet another Rails API documentation website.
67

0 commit comments

Comments
 (0)