diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7e106a7..c79568a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v1 - run: bun install - run: bun fmt --check diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..bfd98bd --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,49 @@ +# Simple workflow for deploying static content to GitHub Pages +name: documentation + +on: + # Runs on pushes targeting the default branch + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Setup Bun + uses: oven-sh/setup-bun@v1 + - name: Install Deps + run: bun install + - name: Build Docs + run: bun doc + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: './docs' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/README.md b/README.md index fe73141..75a8c22 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ rmapi-js ======== -[![build](https://github.com/erikbrinkman/rmapi-js/actions/workflows/node.js.yml/badge.svg)](https://github.com/erikbrinkman/rmapi-js/actions/workflows/node.js.yml) +[![build](https://github.com/erikbrinkman/rmapi-js/actions/workflows/build.yml/badge.svg)](https://github.com/erikbrinkman/rmapi-js/actions/workflows/build.yml) [![docs](https://img.shields.io/badge/docs-docs-blue)](https://erikbrinkman.github.io/rmapi-js/modules.html) [![npm](https://img.shields.io/npm/v/rmapi-js)](https://www.npmjs.com/package/rmapi-js) [![license](https://img.shields.io/github/license/erikbrinkman/rmapi-js)](LICENSE)