Skip to content

Update landing page pitch. #43

Update landing page pitch.

Update landing page pitch. #43

Workflow file for this run

name: Deploy Site
on:
push:
branches: [main]
paths: [site/**, .github/workflows/deploy-site.yml]
pull_request:
paths: [site/**]
workflow_dispatch:
concurrency:
group: deploy-site-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
working-directory: site
run: bun install --frozen-lockfile
- name: Build
working-directory: site
run: bun run build
- name: Generate install-dev.sh
run: |
VERSION=$(cat VERSION)
sed -e "s/^VERSION=\"[^\"]*\"/VERSION=\"${VERSION}\"/" \
-e 's/BEWITCH_CHANNEL:-stable/BEWITCH_CHANNEL:-dev/' \
site/public/install.sh > site/dist/install-dev.sh
- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: site
command: pages deploy dist --project-name=bewitch --branch=${{ github.head_ref || github.ref_name }} --commit-dirty=true
- name: Deploy dev docs to R2
if: github.ref == 'refs/heads/main'
run: |
VERSION=$(cat VERSION)
STABLE=$(cat LATEST_STABLE)
if [ "$VERSION" != "$STABLE" ]; then
echo "VERSION ($VERSION) != LATEST_STABLE ($STABLE), deploying dev docs..."
cd site
VITE_DOCS_BASE=/docs/dev bun run build
cd ..
npm install -g wrangler
scripts/upload-dev-docs.sh site/dist
else
echo "VERSION matches LATEST_STABLE, skipping dev docs."
fi
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}