Skip to content

Commit bfe8ee4

Browse files
committed
Add script
Signed-off-by: Nikhil-Ladha <[email protected]>
1 parent c8a69e1 commit bfe8ee4

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

.github/workflows/build-and-preview-site.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,14 @@ jobs:
1919
npm install
2020
npm run build
2121
22+
- name: Zip Site
23+
run: bash ./script.sh
24+
2225
- name: Upload files
2326
uses: actions/upload-artifact@v2
2427
with:
2528
name: public-dir
26-
path: ./public/*
29+
path: public-dir.zip
2730
- name: Triger Inner workflow
2831
run: echo "triger inner workflow"
2932

.github/workflows/preview-site.yml

+6
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ jobs:
7373
run_id: ${{ github.event.workflow_run.id }}
7474
name: public-dir
7575

76+
- name: Unzip Site
77+
run: |
78+
rm -rf ./public
79+
unzip public-dir.zip
80+
rm -f public-dir.zip
81+
7682
- name: Deploy and Preview 🚀
7783
uses: JamesIves/[email protected]
7884
with:

script.sh

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#! /usr/bin/env bash
2+
3+
if [ -f public-dir.zip ]; then
4+
rm -rf public-dir.zip
5+
fi
6+
zip -r public-dir.zip ./public

0 commit comments

Comments
 (0)