ci: fixed tags and branches #5
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: Build and Deploy SDK documentation | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- '.github/workflows/sdk-doc.yml' | |
- 'src/sdk/**' | |
workflow_dispatch: | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
build: | |
permissions: | |
contents: read | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
- name: Setup Node ⚙️ | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
- name: Setup Pages ⚙️ | |
uses: actions/configure-pages@v5 | |
with: | |
static_site_generator: 'static' | |
- name: Install dependencies ⚙️ | |
run: npm ci --prefix src/sdk | |
- name: Build documentation 🔧 | |
run: npm run build:docs --prefix src/sdk | |
- name: Upload artifact 🚚 | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: src/sdk/docs | |
deploy: | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy 🚀 | |
id: deployment | |
uses: actions/deploy-pages@v4 |