Skip to content

feat: enhance documentation markdown component #5

feat: enhance documentation markdown component

feat: enhance documentation markdown component #5

name: Deploy Website

Check failure on line 1 in .github/workflows/deploy-website.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy-website.yml

Invalid workflow file

(Line: 39, Col: 9): Unrecognized named-value: 'env'. Located at position 1 within expression: env.DEPLOY_TARGET == 'vercel', (Line: 60, Col: 9): Unrecognized named-value: 'env'. Located at position 1 within expression: env.DEPLOY_TARGET == 'cloudflare', (Line: 78, Col: 9): Unrecognized named-value: 'env'. Located at position 1 within expression: env.DEPLOY_TARGET == 'github-pages'
on:
push:
branches: [main]
paths:
- 'apps/website/**'
- 'packages/**'
- 'pnpm-lock.yaml'
workflow_dispatch:
env:
DEPLOY_TARGET: '' # Set to 'vercel', 'cloudflare', 'github-pages', or leave empty to skip
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm --filter @explainer/website build
- uses: actions/upload-artifact@v4
with:
name: website-dist
path: apps/website/dist/
deploy-vercel:
needs: build
if: env.DEPLOY_TARGET == 'vercel'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm --filter @explainer/website build
- uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_WEBSITE_PROJECT_ID }}
working-directory: apps/website
vercel-args: '--prod'
deploy-cloudflare:
needs: build
if: env.DEPLOY_TARGET == 'cloudflare'
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- uses: actions/download-artifact@v4
with:
name: website-dist
path: dist
- uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy dist --project-name=explainer-website
deploy-github-pages:
needs: build
if: env.DEPLOY_TARGET == 'github-pages'
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages-website
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/download-artifact@v4
with:
name: website-dist
path: dist
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: dist
- id: deployment
uses: actions/deploy-pages@v4