Skip to content

Commit 8f91aa4

Browse files
fix(ci): tar before uploading to github artifacts
1 parent facb012 commit 8f91aa4

File tree

1 file changed

+44
-44
lines changed

1 file changed

+44
-44
lines changed

.github/workflows/ci.yml

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,17 @@ jobs:
7676
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }}
7777
SITE_PASSWORD: ${{ secrets.SITE_PASSWORD }}
7878
NEXT_PUBLIC_DOMAIN: ${{ secrets.NEXT_PUBLIC_DOMAIN }}
79-
8079
- name: List .next directory
8180
run: ls -la .next
8281

82+
- name: Compress .next directory
83+
run: tar -czf .next.tar.gz .next
84+
8385
- name: Upload build artifacts
8486
uses: actions/upload-artifact@v4
8587
with:
8688
name: build-artifacts
87-
path: .next
89+
path: .next.tar.gz
8890
retention-days: 7
8991

9092
test:
@@ -94,23 +96,18 @@ jobs:
9496
steps:
9597
- name: Checkout code
9698
uses: actions/checkout@v4
97-
9899
- name: Setup Node.js
99100
uses: actions/setup-node@v4
100101
with:
101102
node-version: ${{ env.NODE_VERSION }}
102103
cache: "npm"
103-
104104
- name: Install dependencies
105105
run: npm ci
106-
107106
# Uncomment when tests are added
108107
# - name: Run unit tests
109108
# run: npm test
110-
111109
# - name: Run integration tests
112110
# run: npm run test:integration
113-
114111
# - name: Upload coverage reports
115112
# uses: codecov/codecov-action@v4
116113
# with:
@@ -134,41 +131,44 @@ jobs:
134131
continue-on-error: true
135132
env:
136133
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
137-
134+
138135
lighthouse:
139-
name: Lighthouse CI
140-
runs-on: ubuntu-latest
141-
needs: build
142-
steps:
143-
- name: Checkout code
144-
uses: actions/checkout@v4
145-
146-
- name: Setup Node.js
147-
uses: actions/setup-node@v4
148-
with:
149-
node-version: ${{ env.NODE_VERSION }}
150-
cache: "npm"
151-
152-
- name: Install dependencies
153-
run: npm ci
154-
155-
- name: Download build artifacts
156-
uses: actions/download-artifact@v4
157-
with:
158-
name: build-artifacts
159-
path: .next
160-
161-
- name: Start application server
162-
run: npx next start
163-
164-
- name: Wait for server to be ready
165-
run: sleep 10
166-
167-
- name: Run Lighthouse CI
168-
uses: treosh/lighthouse-ci-action@v12
169-
with:
170-
urls: |
171-
http://localhost:3000
172-
uploadArtifacts: true
173-
temporaryPublicStorage: true
174-
continue-on-error: true
136+
name: Lighthouse CI
137+
runs-on: ubuntu-latest
138+
needs: build
139+
steps:
140+
- name: Checkout code
141+
uses: actions/checkout@v4
142+
143+
- name: Setup Node.js
144+
uses: actions/setup-node@v4
145+
with:
146+
node-version: ${{ env.NODE_VERSION }}
147+
cache: "npm"
148+
149+
- name: Install dependencies
150+
run: npm ci
151+
152+
- name: Download build artifacts
153+
uses: actions/download-artifact@v4
154+
with:
155+
name: build-artifacts
156+
path: .
157+
158+
- name: Extract .next directory
159+
run: tar -xzf .next.tar.gz
160+
161+
- name: Start application server
162+
run: npx next start &
163+
164+
- name: Wait for server to be ready
165+
run: sleep 10
166+
167+
- name: Run Lighthouse CI
168+
uses: treosh/lighthouse-ci-action@v12
169+
with:
170+
urls: |
171+
http://localhost:3000
172+
uploadArtifacts: true
173+
temporaryPublicStorage: true
174+
continue-on-error: true

0 commit comments

Comments
 (0)