Skip to content

Commit

Permalink
Add github page deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
beef331 committed Jan 4, 2024
1 parent abad2f9 commit 7a478b9
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Github Actions
on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: jiro4989/setup-nim-action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: nimble test -y
26 changes: 26 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: docs
on:
push:
branches:
- master
env:
nim-version: 'stable'
nim-src: ${{ github.event.repository.name }}.nim
deploy-dir: .gh-pages
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: jiro4989/setup-nim-action@v1
with:
nim-version: ${{ env.nim-version }}
- run: nimble install -Y
- run: nimble doc --index:on --project --git.url:https://github.com/${{ github.repository }} --git.commit:master --out:${{ env.deploy-dir }} ${{ env.nim-src }}
- name: "Copy to index.html"
run: cp ${{ env.deploy-dir }}/${{ github.event.repository.name }}.html ${{ env.deploy-dir }}/index.html
- name: Deploy documents
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.deploy-dir }}

0 comments on commit 7a478b9

Please sign in to comment.