36 lines
868 B
YAML
36 lines
868 B
YAML
|
name: Deploy Docs
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- main
|
||
|
tags:
|
||
|
- v*
|
||
|
paths-ignore:
|
||
|
- "CHANGELOG.md"
|
||
|
jobs:
|
||
|
deploy:
|
||
|
runs-on: ubuntu-16.04
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- uses: MeilCli/setup-crystal-action@v4.0.1
|
||
|
with:
|
||
|
crystal_version: 1.0.0
|
||
|
shards_version: 0.14.1
|
||
|
- name: Install dependencies
|
||
|
run: shards install
|
||
|
- name: Run crystal doc
|
||
|
run: crystal doc
|
||
|
- name: Extract branch name
|
||
|
shell: bash
|
||
|
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
||
|
id: extract_branch
|
||
|
- name: Deploy to gh-pages
|
||
|
uses: peaceiris/actions-gh-pages@v3.7.0-8
|
||
|
with:
|
||
|
personal_token: ${{ secrets.GITHUB_TOKEN }}
|
||
|
publish_dir: docs
|
||
|
destination_dir: ${{ steps.extract_branch.outputs.branch }}
|
||
|
|