shard-ameba/.github/workflows/docs.yml

36 lines
796 B
YAML
Raw Normal View History

2021-01-11 17:33:32 +00:00
name: Docs
on:
push:
branches: [master]
2023-01-03 15:36:33 +00:00
permissions:
contents: write
2021-01-11 17:33:32 +00:00
jobs:
2023-01-03 15:36:33 +00:00
build-and-deploy:
concurrency: ci-${{ github.ref }}
2021-01-11 17:33:32 +00:00
runs-on: ubuntu-latest
steps:
- name: Inject slug/short variables
2022-12-21 15:08:16 +00:00
uses: rlespinasse/github-slug-action@v4
2021-01-11 17:33:32 +00:00
- name: Install Crystal
2022-12-21 15:08:16 +00:00
uses: crystal-lang/install-crystal@v1
2021-01-11 17:33:32 +00:00
- name: Download source
uses: actions/checkout@v4
2021-01-11 17:33:32 +00:00
- name: Install dependencies
run: shards install
- name: Build docs
run: crystal docs --project-version="${{ env.GITHUB_REF_SLUG }}" --source-refname="${{ env.GITHUB_SHA_SHORT }}"
2021-01-11 17:33:32 +00:00
- name: Deploy docs 🚀
2022-12-22 12:45:27 +00:00
uses: JamesIves/github-pages-deploy-action@v4
2021-01-11 17:33:32 +00:00
with:
2022-12-21 15:08:16 +00:00
branch: gh-pages
folder: docs
clean: true