Skip to content

Commit

Permalink
chore: point production build
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoBorai committed Jan 6, 2025
1 parent 5ef45dd commit 28c59ab
Showing 1 changed file with 26 additions and 21 deletions.
47 changes: 26 additions & 21 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,46 @@
name: Deploy Production

on:
push:
tags:
- 'v*'
workflow_dispatch:
branches:
- main

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Publish
steps:
- name: Checkout
uses: actions/[email protected]
with:
ref: 'main'
- name: Checkout Source Code
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
bun-version: latest
targets: wasm32-unknown-unknown
components: rustfmt, clippy

- name: Setup Rust Cache
uses: Swatinem/rust-cache@v2

- name: Setup Cargo Binstall
uses: cargo-bins/cargo-binstall@main

- name: Install Dependencies
run: bun i
- name: Install Rust Binaries
run: |
cargo binstall -y --force trunk
- name: Build Check
env:
NODE_ENV: production
run: bun run build
- name: Build
working-directory: ./crates/www
run: trunk build --release

- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@1.0.0
- name: Deploy Client
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
projectName: ${{ secrets.CLOUDFLARE_PAGES_PROJECT_NAME }}
directory: ./.svelte-kit/cloudflare
command: pages deploy ./dist --project-name=${{ secrets.CLOUDFLARE_PAGES_PROJECT_NAME }}
workingDirectory: ./crates/www
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 28c59ab

Please sign in to comment.