diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 89cba53..178f001 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 683a6b5..f7e25d5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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: