-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (45 loc) · 1.46 KB
/
nuxt_integration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Nuxt Integration
on:
pull_request
env:
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
DEPLOY_TAG: mark4-nuxt-stage-${{ github.event.number }}
DEPLOY_ROUTE: https://mark4-nuxt-stage-${{ github.event.number }}.radicalplatforms.workers.dev
jobs:
cf_deploy_nuxt_prod:
name: Deploy Nuxt to Stage
runs-on: ubuntu-latest
environment:
name: nuxt-stage-${{ github.event.number }}
url: ${{ env.DEPLOY_ROUTE }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
cache-dependency-path: '*/package-lock.json'
- 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: ${{ secrets.CF_API_TOKEN }}
command: deploy --name ${{ env.DEPLOY_TAG }}
workingDirectory: nuxt