Skip to content

add new actions

add new actions #5

name: Website Deployment
on:
push:
branches:
- main
paths:
- 'apps/website/**'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install Dependencies
working-directory: ./apps/website
run: npm ci
- name: Build
working-directory: ./apps/website
run: npm run build
- name: Deploy SSR
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: ./apps/website
command: pages deploy ./dist/store/cloudflare --project-name=nicobytes-store-website
- name: Deploy SPA
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: ./apps/website
command: pages deploy ./dist/store/browser --project-name=nicobytes-store-website-spa