Skip to content

fixup! doc(index): add link to homepage #144

fixup! doc(index): add link to homepage

fixup! doc(index): add link to homepage #144

Workflow file for this run

name: docs
# yamllint disable-line rule:truthy
on:
push:
branches:
- master
env:
nim-version: 'stable'
git-url-arg: --git.url:https://github.com/${{ github.repository }} --git.commit:master
deploy-dir: .gh-pages
lib-deploy-dir: .gh-pages/Lib
jobs:
docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Cache nimble
id: cache-nimble
uses: actions/cache@v2
with:
path: ~/.nimble
key: ${{ runner.os }}-nimble
- uses: jiro4989/setup-nim-action@v1
with:
nim-version: ${{ env.nim-version }}
- name: genDoc
run: nimble testDoc --index:on --project ${{ env.git-url-arg }} --outdir:${{ env.deploy-dir }} -d:homepage="${{ github.event.repository.homepage }}"
- name: genLibDoc
run: nimble testLibDoc ${{ env.git-url-arg }} --outdir:${{ env.lib-deploy-dir }}
- name: "Copy to index.html"
run: cp ${{ env.deploy-dir }}/${{ github.event.repository.name }}.html ${{ env.deploy-dir }}/index.html
- name: "CNAME"
run: echo -n $(echo ${{ github.event.repository.homepage }} | grep -oP 'https?://\K[^/]+') > ${{ env.deploy-dir }}/CNAME
- name: Deploy documents
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.deploy-dir }}