Skip to content

Commit 701ad72

Browse files
committed
ci: add conditions and build artifact handling
1 parent 298ed1d commit 701ad72

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/_tests.yml

+15-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ jobs:
2424

2525
- run: pnpm build
2626

27+
- name: 🔺 Upload frontend distribution artifacts
28+
uses: actions/upload-artifact@v3
29+
with:
30+
name: build_distribution
31+
path: theme/dist
32+
if-no-files-found: error
33+
retention-days: 1
2734

2835
build_playground:
2936
needs: build
@@ -32,14 +39,21 @@ jobs:
3239
steps:
3340
- uses: actions/checkout@v3
3441

42+
- name: 🔻 Download build artifacts
43+
uses: actions/download-artifact@v3
44+
with:
45+
name: build_distribution
46+
path: theme/dist
47+
3548
- uses: ./.github/actions/setup
3649

3750
- run: pnpm build:testing
3851

3952
- name: Upload artifact
53+
if: github.ref == 'refs/heads/main'
4054
uses: actions/upload-pages-artifact@v1
4155
with:
42-
path: './testing/dist/'
56+
path: testing/dist
4357

4458
unit_tests:
4559
name: 🧪 Unit Tests

0 commit comments

Comments
 (0)