update CI, test nim devel #28
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: margrave | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jiro4989/setup-nim-action@v2 | |
- name: install nimbleutils | |
run: nimble install -y https://github.com/metagn/nimbleutils@#HEAD | |
- name: install dependencies | |
run: nimble install -y | |
- name: run tests | |
run: nimble tests | |
test-devel: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jiro4989/setup-nim-action@v2 | |
with: | |
nim-version: devel | |
- name: install nimbleutils | |
run: nimble install -y https://github.com/metagn/nimbleutils@#HEAD | |
- name: install dependencies | |
run: nimble install -y | |
- name: run tests | |
run: nimble tests | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jiro4989/setup-nim-action@v2 | |
- name: install nimbleutils | |
run: nimble install -y https://github.com/metagn/nimbleutils@#HEAD | |
- name: install dependencies | |
run: nimble install -y | |
- name: compile JS | |
run: nimble tools | |
- name: compile docs | |
run: nimble docs | |
- name: move to subfolder | |
run: | | |
mkdir pages | |
mv browser pages/ | |
mv docs pages/ | |
cd pages | |
git init | |
git add -A | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git commit -m 'deploy' | |
- name: push to branch | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages | |
force: true | |
directory: ./pages/ | |
if: github.event_name != 'pull_request' | |