Skip to content

Commit bc8257d

Browse files
ci: add nuxthub workflow
1 parent 857118b commit bc8257d

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/nuxthub.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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/main' && '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+
with:
21+
version: 9
22+
23+
- name: Install Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 22
27+
cache: 'pnpm'
28+
29+
- name: Install dependencies
30+
run: pnpm install
31+
32+
- name: Ensure NuxtHub module is installed
33+
run: pnpx nuxthub@latest ensure
34+
35+
- name: Build application
36+
run: pnpm build
37+
38+
- name: Deploy to NuxtHub
39+
uses: nuxt-hub/action@v1
40+
id: deploy
41+
with:
42+
project-key: owlnai-com-ot1u

0 commit comments

Comments
 (0)