Skip to content

v0.3.0

v0.3.0 #25

Workflow file for this run

name: Deploy Docs
on:
push:
branches: [main]
paths:
- 'website/**'
- '.github/workflows/deploy-docs.yml'
tags-ignore:
- '**'
release:
types: [published]
permissions:
contents: read
concurrency:
group: pages-${{ github.event_name }}
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: website/package-lock.json
- name: Install dependencies
working-directory: website
run: npm ci
- name: Build
working-directory: website
run: npm run build
- name: Deploy preview
if: github.event_name == 'push'
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy website/build --project-name=harness-kit-docs --branch=preview
- name: Deploy production
if: github.event_name == 'release'
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy website/build --project-name=harness-kit-docs --branch=main