Skip to content

Commit d277e37

Browse files
committed
chore: update CI workflows
1 parent 907a14c commit d277e37

File tree

3 files changed

+19
-20
lines changed

3 files changed

+19
-20
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ on:
44
push:
55
branches:
66
- '*'
7-
workflow_call: # Allow this workflow to be called by other workflows
87

98
jobs:
109
ci:
1110
runs-on: ubuntu-latest
12-
environment: Testnet
11+
environment: preview-testnet
1312
steps:
1413
- uses: actions/checkout@v4
1514

@@ -37,5 +36,5 @@ jobs:
3736
- name: Test
3837
run: pnpm run test
3938
env:
40-
NUXT_RPC_URL: ${{ secrets.RPC_URL }}
39+
NUXT_RPC_URL: ${{ secrets.NUXT_RPC_URL }}
4140
NUXT_PUBLIC_NIMIQ_NETWORK: ${{ vars.NUXT_PUBLIC_NIMIQ_NETWORK }}

.github/workflows/nuxt-hub.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ on:
66

77
jobs:
88
deploy-testnet:
9-
needs: [ci]
109
name: Deploy to NuxtHub Testnet
1110
runs-on: ubuntu-latest
1211
environment:
13-
name: ${{ github.ref == 'refs/heads/main' && 'production' || 'preview' }}
12+
name: ${{ github.ref == 'refs/heads/main' && 'production-testnet' || 'preview-testnet' }}
1413
url: ${{ steps.deploy-testnet.outputs.deployment-url }}
1514
permissions:
1615
contents: read
@@ -19,9 +18,6 @@ jobs:
1918
steps:
2019
- uses: actions/checkout@v4
2120

22-
- name: Install pnpm
23-
uses: pnpm/action-setup@v4
24-
2521
- name: Install Node.js
2622
uses: actions/setup-node@v4
2723
with:
@@ -30,22 +26,27 @@ jobs:
3026

3127
- name: Install dependencies
3228
run: pnpm install
29+
env:
30+
NUXT_RPC_URL: ${{ secrets.NUXT_RPC_URL }}
31+
NUXT_PUBLIC_NIMIQ_NETWORK: ${{ vars.NUXT_PUBLIC_NIMIQ_NETWORK }}
3332

3433
- name: Build application
3534
run: pnpm run build
35+
env:
36+
NUXT_RPC_URL: ${{ secrets.NUXT_RPC_URL }}
37+
NUXT_PUBLIC_NIMIQ_NETWORK: ${{ vars.NUXT_PUBLIC_NIMIQ_NETWORK }}
3638

3739
- name: Deploy to NuxtHub Testnet
3840
uses: nuxt-hub/action@v1
3941
id: deploy-testnet
4042
with:
41-
project-key: ${{ secrets.NUXT_HUB_PROJECT_KEY }}
43+
project-key: ${{ vars.NUXT_HUB_PROJECT_KEY }}
4244

4345
deploy-mainnet:
44-
needs: [ci]
4546
name: Deploy to NuxtHub Mainnet
4647
runs-on: ubuntu-latest
4748
environment:
48-
name: ${{ github.ref == 'refs/heads/main' && 'production' || 'preview' }}
49+
name: ${{ github.ref == 'refs/heads/main' && 'production-mainnet' || 'preview-mainnet' }}
4950
url: ${{ steps.deploy-mainnet.outputs.deployment-url }}
5051
permissions:
5152
contents: read
@@ -65,15 +66,18 @@ jobs:
6566

6667
- name: Install dependencies
6768
run: pnpm install
69+
env:
70+
NUXT_RPC_URL: ${{ secrets.NUXT_RPC_URL }}
71+
NUXT_PUBLIC_NIMIQ_NETWORK: ${{ vars.NUXT_PUBLIC_NIMIQ_NETWORK }}
6872

6973
- name: Build application
7074
run: pnpm run build
75+
env:
76+
NUXT_RPC_URL: ${{ secrets.NUXT_RPC_URL }}
77+
NUXT_PUBLIC_NIMIQ_NETWORK: ${{ vars.NUXT_PUBLIC_NIMIQ_NETWORK }}
7178

7279
- name: Deploy to NuxtHub Mainnet
7380
uses: nuxt-hub/action@v1
7481
id: deploy-mainnet
7582
with:
76-
project-key: ${{ secrets.NUXT_HUB_PROJECT_KEY }}
77-
78-
ci:
79-
uses: ./.github/workflows/ci.yml
83+
project-key: ${{ vars.NUXT_HUB_PROJECT_KEY }}

.github/workflows/pkg.new.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ on:
66

77
jobs:
88
build:
9-
needs: [ci]
109
runs-on: ubuntu-latest
11-
10+
environment: preview-testnet
1211
steps:
1312
- name: Checkout code
1413
uses: actions/checkout@v4
@@ -27,6 +26,3 @@ jobs:
2726
run: pnpm build
2827

2928
- run: pnpx pkg-pr-new publish './packages/*'
30-
31-
ci:
32-
uses: ./.github/workflows/ci.yml

0 commit comments

Comments
 (0)