Skip to content

Commit b5a3471

Browse files
committed
Use Nuxt for workflows
1 parent bd2f0b6 commit b5a3471

File tree

2 files changed

+6
-52
lines changed

2 files changed

+6
-52
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,6 @@ env:
3838
NUXT_PUBLIC_FIREBASE_STORAGE_BUCKET: fake
3939
NUXT_PUBLIC_STRIPE_MONTHLY_PRICE:
4040
jobs:
41-
build:
42-
runs-on: ubuntu-latest
43-
steps:
44-
- uses: actions/checkout@v3
45-
- uses: actions/setup-node@v3
46-
with:
47-
node-version: 16
48-
cache: yarn
49-
- run: yarn install --immutable
50-
- run: yarn build
5141
test-cypress:
5242
runs-on: ubuntu-latest
5343
steps:
@@ -56,35 +46,21 @@ jobs:
5646
with:
5747
node-version: 16
5848
cache: yarn
59-
- run: docker-compose up -d
60-
- uses: cypress-io/[email protected]
61-
with:
62-
config: baseUrl=http://localhost:8889
63-
build: yarn build
64-
start: yarn preview:latest
65-
wait-on: http://localhost:32777
66-
test-cypress-nuxt:
67-
runs-on: ubuntu-latest
68-
steps:
69-
- uses: actions/checkout@v3
70-
- uses: actions/setup-node@v3
71-
with:
72-
node-version: 16
73-
cache: yarn
49+
- run: yarn install --immutable
7450
- run: docker-compose up -d
7551
- uses: cypress-io/[email protected]
7652
with:
7753
config: baseUrl=http://localhost:3000
78-
build: yarn nuxt:build
79-
start: yarn nuxt:preview
54+
build: yarn build
55+
start: yarn preview
8056
wait-on: 'http://localhost:3000,http://localhost:32777'
8157
- uses: actions/upload-artifact@v3
8258
if: failure()
8359
with:
8460
name: cypress-screenshots
8561
path: test/cypress/screenshots
8662
- uses: actions/upload-artifact@v3
87-
if: always()
63+
if: failure()
8864
with:
8965
name: cypress-videos
9066
path: test/cypress/videos

.github/workflows/preview.yml

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ on:
33
pull_request:
44
workflow_dispatch:
55
env:
6-
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
76
NODE_OPTIONS: --max-old-space-size=4096
87
NUXT_PUBLIC_CDN_URL: ${{ secrets.VITE_APP_CDN_URL }}
98
NUXT_PUBLIC_DISCORD_INVITE_LINK: ${{ secrets.VITE_DISCORD_INVITE_LINK }}
@@ -27,7 +26,8 @@ env:
2726
NUXT_PUBLIC_FIREBASE_PROJECT_ID: ${{ secrets.VUE_APP_FIREBASE_PROJECT_ID }}
2827
NUXT_PUBLIC_FIREBASE_STORAGE_BUCKET: ${{ secrets.VUE_APP_FIREBASE_STORAGE_BUCKET }}
2928
NUXT_PUBLIC_STRIPE_MONTHLY_PRICE: ${{ secrets.VUE_APP_STRIPE_MONTHLY_PRICE }}
30-
OCTO_NAME: Octo (Test)
29+
OCTO_NAME: Octo (Preview)
30+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
3131
jobs:
3232
deploy_vercel:
3333
env:
@@ -51,25 +51,3 @@ jobs:
5151
run: |
5252
url=`yarn vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}`
5353
echo "::set-output name=url::$url"
54-
deploy_vercel_nuxt:
55-
env:
56-
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_TEST_PROJECT_ID }}
57-
environment:
58-
name: preview
59-
url: ${{ steps.deploy.outputs.url }}
60-
runs-on: ubuntu-latest
61-
steps:
62-
- uses: actions/checkout@v3
63-
- uses: actions/setup-node@v3
64-
with:
65-
node-version: 16
66-
cache: yarn
67-
- run: yarn install --immutable
68-
- run: yarn vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
69-
- run: yarn vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
70-
- run: cp ./.vercel/output/static/manifest.webmanifest ./.vercel/output/static/manifest.json
71-
- run: cp ./.vercel/output/static/sw.js ./.vercel/output/static/service-worker.js
72-
- id: deploy
73-
run: |
74-
url=`yarn vercel deploy --prod --prebuilt --token=${{ secrets.VERCEL_TOKEN }}`
75-
echo "::set-output name=url::$url"

0 commit comments

Comments
 (0)