Skip to content

Commit

Permalink
deploy docs to GHA on tag creation
Browse files Browse the repository at this point in the history
  • Loading branch information
mishankov committed Mar 20, 2024
1 parent 7f12564 commit a74a540
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: CI
on:
push:
branches: [ main ]
tags: ["v*.*.*"]
pull_request:
branches: [ main ]

Expand Down Expand Up @@ -33,3 +34,41 @@ jobs:
# go-httpbin container does not run on windows runner for some reason. macos runner does not has docker by default
if: ${{ matrix.os == 'ubuntu-latest' }}
run: nimble inttests

deploy-docs:
needs:
- build

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

if: github.event_name == 'release' && github.event.action == 'created'

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: jiro4989/setup-nim-action@v1
with:
nim-version: "2.0.2"
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Generate docs
run: nimble docs

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './src/htmldocs'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit a74a540

Please sign in to comment.