Skip to content

solve #206, start working at java bindings ... #560

solve #206, start working at java bindings ...

solve #206, start working at java bindings ... #560

Workflow file for this run

name: Github Pages 🌐
on:
push:
branches:
- 'master'
paths-ignore:
- '.github/ISSUE_TEMPLATE/*'
- '*.md'
- '*.nimble'
- '.gitignore'
- 'LICENSE'
- '**/FUNDING.yml'
- '**/tests.yml'
- '**/examples.yml'
- '**/language_bindings.yml'
pull_request:
paths-ignore:
- '.github/ISSUE_TEMPLATE/*'
- '*.md'
- '*.nimble'
- '.gitignore'
- 'LICENSE'
- '**/FUNDING.yml'
- '**/tests.yml'
- '**/examples.yml'
- '**/language_bindings.yml'
permissions:
contents: write
jobs:
before:
runs-on: windows-latest
if: "! contains(github.event.head_commit.message, '[skip ci]')"
steps:
- run: echo "not contains '[skip ci]'"
docs:
runs-on: windows-latest
needs: before
env:
nim_version: '1.6.14'
steps:
- uses: actions/checkout@v3
- name: Cache nimble
id: cache-nimble
uses: actions/cache@v1
with:
path: ~/.nimble
key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }}
- uses: jiro4989/setup-nim-action@v1
with:
nim-version: ${{ env.nim_version }}
- name: Install Dependencies 🔃
run: |
nimble refresh
nimble install -y -d
- name: Generate API documents 📃
run: nim doc --index:on -d:docgen --project --out:docs --hints:off src/happyx.nim
- name: Build HappyX website 🌐
timeout-minutes: 2
run: |
cd ./examples/website/src
nim js -d:danger --opt:size --checks:off --assertions:off --hints:off --warnings:off --panics:off --lineDir:off main
echo "minify js"
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" --data-urlencode "[email protected]" https://www.toptal.com/developers/javascript-minifier/api/raw -o main.js
cd ../../..
mkdir ./docs/happyx/public/
mkdir ./docs/public/
cp ./examples/website/src/index.html ./docs/
cp ./examples/website/src/main.js ./docs/
cp ./examples/website/src/happyx/public/* ./docs/happyx/public/
cp ./examples/website/src/happyx/public/* ./docs/public/
- name: Deploy documents 💨
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
if: github.ref == 'refs/heads/master'