Skip to content

Commit 1704e74

Browse files
ci: add nuxthub workflow
1 parent 2796999 commit 1704e74

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/nuxthub.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy to NuxtHub
2+
on: push
3+
4+
jobs:
5+
deploy:
6+
name: "Deploy to NuxtHub"
7+
runs-on: ubuntu-latest
8+
environment:
9+
name: ${{ github.ref == 'refs/heads/production' && 'production' || 'preview' }}
10+
url: ${{ steps.deploy.outputs.deployment-url }}
11+
permissions:
12+
contents: read
13+
id-token: write
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Install pnpm
19+
uses: pnpm/action-setup@v4
20+
21+
- name: Install Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 22
25+
cache: 'pnpm'
26+
27+
- name: Install dependencies
28+
run: pnpm install
29+
30+
- name: Ensure NuxtHub module is installed
31+
run: pnpx nuxthub@latest ensure
32+
33+
- name: Build application
34+
run: pnpm build
35+
36+
- name: Deploy to NuxtHub
37+
uses: nuxt-hub/action@v1
38+
id: deploy
39+
with:
40+
project-key: nuxt-content-bl-e7t8

0 commit comments

Comments
 (0)