Skip to content

✨ Redesign Favicon: Clean Upload/Share Icon #19

✨ Redesign Favicon: Clean Upload/Share Icon

✨ Redesign Favicon: Clean Upload/Share Icon #19

Workflow file for this run

name: Deploy to Cloudflare Pages
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build Astro site
run: npm run build
- name: Deploy to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: htmlshare-astro
directory: dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
database-migrate:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: build-and-deploy
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install Wrangler
run: npm install -g wrangler
- name: Run database migrations
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: |
echo "Running database migrations..."
npx wrangler d1 execute htmlshare-db --file=schema.sql