Skip to content

Nuxt Deploy Production #4

Nuxt Deploy Production

Nuxt Deploy Production #4

name: Nuxt Deploy Production
on:
push:
branches:
- master
schedule: # Run every 1st of the month at 06:00 UTC, for summarize resume/cv pdf generation
- cron: '0 6 1 * *'
env:
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
jobs:
cf_deploy_nuxt_prod:
name: Deploy Nuxt to Prod
runs-on: ubuntu-latest
environment:
name: production
url: https://radison.io
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install Summarize Dependencies
run: npm ci
working-directory: nuxt/summarize
- name: Validate Summarize Data
run: npm run validate
working-directory: nuxt/summarize
- name: Install Nuxt Dependencies
run: npm ci
working-directory: nuxt
- name: Generate Summarize PDFs
run: npm run dev & sleep 15 && cd summarize && npm run compile
working-directory: nuxt
- name: Build Nuxt
run: npm run build
working-directory: nuxt
env:
NITRO_PRESET: cloudflare
- name: Publish Nuxt to Cloudflare Workers
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ env.CF_API_TOKEN }}
command: deploy --env production
workingDirectory: nuxt