Add blend2d submodule + build docs via gh workflow #1
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: docs | ||
on: | ||
push: | ||
tags: | ||
- '*.*.*' | ||
branches: | ||
- main | ||
env: | ||
mainModule: 'blend2d' | ||
nim-version: 'stable' | ||
nim-src: src/${{ env.mainModule }}.nim | ||
Check failure on line 11 in .github/workflows/docs.yml GitHub Actions / docsInvalid workflow file
|
||
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: nim doc --index:on --project --path:. --out:${{ env.deploy-dir }} ${{ env.nim-src }} | ||
- name: "Rename to index.html" | ||
run: mv ${{ env.deploy-dir }}/${{ env.mainModule }}.html ${{ env.deploy-dir }}/index.html | ||
- name: "Find and replace (index.html)" | ||
run: sed -i 's/${{ env.mainModule }}.html/index.html/g' ${{ env.deploy-dir }}/index.html | ||
# - name: "Find and replace (idx)" | ||
# run: sed -i 's/${{ github.event.repository.name }}.html/index.html/g' ${{ env.deploy-dir }}/${{ github.event.repository.name }}.idx | ||
- name: "Find and replace (theindex.html)" | ||
run: sed -i 's/${{ env.mainModule }}.html/index.html/g' ${{ env.deploy-dir }}/theindex.html | ||
- name: Deploy documents | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ${{ env.deploy-dir }} |