Skip to content

Commit

Permalink
Add script
Browse files Browse the repository at this point in the history
Signed-off-by: Nikhil-Ladha <[email protected]>
  • Loading branch information
Nikhil-Ladha committed Mar 1, 2021
1 parent c8a69e1 commit bfe8ee4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build-and-preview-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ jobs:
npm install
npm run build
- name: Zip Site
run: bash ./script.sh

- name: Upload files
uses: actions/upload-artifact@v2
with:
name: public-dir
path: ./public/*
path: public-dir.zip
- name: Triger Inner workflow
run: echo "triger inner workflow"

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/preview-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ jobs:
run_id: ${{ github.event.workflow_run.id }}
name: public-dir

- name: Unzip Site
run: |
rm -rf ./public
unzip public-dir.zip
rm -f public-dir.zip
- name: Deploy and Preview 🚀
uses: JamesIves/[email protected]
with:
Expand Down
6 changes: 6 additions & 0 deletions script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#! /usr/bin/env bash

if [ -f public-dir.zip ]; then
rm -rf public-dir.zip
fi
zip -r public-dir.zip ./public

0 comments on commit bfe8ee4

Please sign in to comment.