Skip to content

Commit 2b69c4d

Browse files
ci: add nuxthub workflow
1 parent dd378f2 commit 2b69c4d

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/nuxthub.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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+
defaults:
15+
run:
16+
working-directory: refact
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Enable Corepack
22+
run: corepack enable
23+
24+
- name: Install Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 22
28+
cache: 'npm'
29+
30+
- name: Install dependencies
31+
run: npm install
32+
33+
- name: Ensure NuxtHub module is installed
34+
run: npx nuxthub@latest ensure
35+
36+
- name: Build application
37+
run: npm run build
38+
39+
- name: Deploy to NuxtHub
40+
uses: nuxt-hub/action@v1
41+
id: deploy
42+
with:
43+
project-key: tevin79-github--86rj
44+
directory: refact/dist

0 commit comments

Comments
 (0)