fix(regex): fix code to work with nim-regex >= 0.21.0 #53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test-and-docs | |
on: [push, pull_request] | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
nim: | |
# - 'stable' | |
# - "1.9.x" | |
- "devel" | |
name: Nim ${{ matrix.nim }} test | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup nim | |
uses: jiro4989/setup-nim-action@v1 | |
with: | |
nim-version: ${{ matrix.nim }} | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run tests | |
run: nimble test -y | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
nim: | |
# - 'stable' | |
- "devel" | |
name: Nim ${{ matrix.nim }} docsgen | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup nim | |
uses: jiro4989/setup-nim-action@v1 | |
with: | |
nim-version: ${{ matrix.nim }} | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build docs | |
shell: bash | |
run: | | |
branch=${{ github.ref }} | |
branch=${branch##*/} | |
nimble doc2 --project --outdir:htmldocs --index:only -y \ | |
'-d:docgen' \ | |
'--git.url:https://github.com/${{ github.repository }}' \ | |
'--git.commit:${{ github.sha }}' \ | |
"--git.devel:$branch" \ | |
"./tuicrown.nim" || true | |
nimble doc2 --project --outdir:htmldocs -y \ | |
'-d:docgen' \ | |
'--git.url:https://github.com/${{ github.repository }}' \ | |
'--git.commit:${{ github.sha }}' \ | |
"--git.devel:$branch" \ | |
"./tuicrown.nim" | |
cp ./htmldocs/{tuicrown,index}.html || true | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./htmldocs |