Skip to content

Commit

Permalink
try ci docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nitely committed Jan 5, 2024
1 parent 45091a9 commit 5a521e2
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,21 @@ jobs:
run: |
docker pull nimlang/nim:${{ matrix.nim }}
docker run --rm -v `pwd`:/usr/src/app -w /usr/src/app nimlang/nim:${{ matrix.nim }} /bin/bash -c "git config --global --add safe.directory /usr/src/app; nimble install -y; nimble test"
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- name: docs
- name: Build docs
if: matrix.nim == '2.0.0'
run: |
cd nim-regex
nimble docs
docker pull nimlang/nim:${{ matrix.nim }}
docker run --rm -v `pwd`:/usr/src/app -w /usr/src/app nimlang/nim:${{ matrix.nim }} /bin/bash -c "git config --global --add safe.directory /usr/src/app; nimble docs"
- name: Deploy docs
# to view docs on your own fork: push a gh-pages branch on your fork,
# enable gh-pages in your fork
# and remove `github.ref == 'refs/heads/master'` below
if: |
github.event_name == 'push' && github.ref == 'refs/heads/master'
github.event_name == 'push' && github.ref == 'refs/heads/master' &&
matrix.nim == '2.0.0'
uses: crazy-max/ghaction-github-pages@v1
with:
build_dir: nim-regex/docs
build_dir: docs
target_branch: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 5a521e2

Please sign in to comment.