Skip to content

Commit 10acf66

Browse files
committed
feat: Add GitHub Actions workflow for deploying to Cloudflare with NuxtHub Cli
1 parent 8050ebe commit 10acf66

File tree

2 files changed

+4154
-3522
lines changed

2 files changed

+4154
-3522
lines changed

.github/workflows/deploy.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Deploy to Cloudflare with NuxtHub Cli
2+
on:
3+
push:
4+
branches: [chore/nuxthub]
5+
jobs:
6+
build-and-deploy:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v4
11+
- uses: pnpm/action-setup@v4
12+
name: Install pnpm
13+
with:
14+
version: 9.4.0
15+
run_install: false
16+
- name: Install Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 20
20+
cache: pnpm
21+
- name: Get pnpm store directory
22+
shell: bash
23+
run: |
24+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
25+
- uses: actions/cache@v4
26+
name: Setup pnpm cache
27+
with:
28+
path: ${{ env.STORE_PATH }}
29+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
30+
restore-keys: |
31+
${{ runner.os }}-pnpm-store-
32+
- name: Install dependencies
33+
run: pnpm install
34+
- name: Deploy with nuxt-hub cli
35+
run: npx nuxthub deploy
36+
env:
37+
NUXT_HUB_PROJECT_KEY: ${{ secrets.NUXT_HUB_PROJECT_KEY}}
38+
NUXT_HUB_USER_TOKEN: ${{ secrets.NUXT_HUB_USER_TOKEN }}

0 commit comments

Comments
 (0)