Skip to content

Commit ea38665

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

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

.github/workflows/nuxthub.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,37 @@ jobs:
66
name: "Deploy to NuxtHub"
77
runs-on: ubuntu-latest
88
environment:
9-
name: ${{ github.ref == 'refs/heads/main' && 'production' || 'preview' }}
9+
name: ${{ github.ref == 'refs/heads/refact' && 'production' || 'preview' }}
1010
url: ${{ steps.deploy.outputs.deployment-url }}
1111
permissions:
1212
contents: read
1313
id-token: write
14-
defaults:
15-
run:
16-
working-directory: refact
1714

1815
steps:
1916
- uses: actions/checkout@v4
2017

21-
- name: Enable Corepack
22-
run: corepack enable
18+
- name: Install pnpm
19+
uses: pnpm/action-setup@v4
20+
with:
21+
version: 9
2322

2423
- name: Install Node.js
2524
uses: actions/setup-node@v4
2625
with:
2726
node-version: 22
28-
cache: 'npm'
27+
cache: 'pnpm'
2928

3029
- name: Install dependencies
31-
run: npm install
30+
run: pnpm install
3231

3332
- name: Ensure NuxtHub module is installed
34-
run: npx nuxthub@latest ensure
33+
run: pnpx nuxthub@latest ensure
3534

3635
- name: Build application
37-
run: npm run build
36+
run: pnpm build
3837

3938
- name: Deploy to NuxtHub
4039
uses: nuxt-hub/action@v1
4140
id: deploy
4241
with:
4342
project-key: tevin79-github--86rj
44-
directory: refact/dist

0 commit comments

Comments
 (0)