add crystal docs workflow

master
Kanezoh 2021-11-18 12:06:37 +09:00
parent 2c26835252
commit f349c40b4d
1 changed files with 29 additions and 0 deletions

29
.github/workflows/documentation.yml vendored Normal file
View File

@ -0,0 +1,29 @@
name: website
on:
push:
branches: [ master ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: nightly
- name: Check out repository code
uses: actions/checkout@v2
- name: Install dependencies
run: shards install
- name: Generate documentation
run: crystal docs
-
name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}