Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,22 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: treeform/setup-nim-action@v5
- run: nimby install -g shady.nimble
- uses: actions/checkout@v5
- uses: treeform/setup-nim-action@v6

# Nimby installs packages as siblings of the workspace root, so the
# workspace has to be the parent of this checkout: shady then sits inside
# it next to its dependencies and nim finds nim.cfg by walking up.
- name: Create a Nimby workspace
shell: bash
run: |
cd ..
nimby create

- name: Install dependencies
shell: bash
run: |
cd ..
nimby install shady/shady.nimble

- run: nim r tests/test_shady.nim
29 changes: 22 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,36 @@ on:
branches:
- master
env:
nim-version: 'stable'
nim-src: 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 }}
- uses: actions/checkout@v5
- uses: treeform/setup-nim-action@v6

# Nimby installs packages as siblings of the workspace root, so the
# workspace has to be the parent of this checkout: shady then sits inside
# it next to its dependencies and nim finds nim.cfg by walking up.
- name: Create a Nimby workspace
shell: bash
run: |
cd ..
nimby create

- name: Install dependencies
shell: bash
run: |
cd ..
nimby install shady/shady.nimble

- name: Generate documentation
run: nim 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:
Expand Down