From 4029129c75038380ada32d36dd04c28cc6b54821 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Mon, 18 Sep 2023 13:04:05 -0500 Subject: [PATCH] ci: add docs workflow for api --- .github/workflows/docs.yml | 45 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..7097918 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,45 @@ +name: 📄 Build Docs + +on: + push: + tags: ["v*.*.*"] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-22.04 + permissions: + contents: write + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: jiro4989/setup-nim-action@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Build Docs + run: nim docs + + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: ./public + + deploy: + needs: build + runs-on: ubuntu-latest + + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2