Skip to content

Commit

Permalink
add files
Browse files Browse the repository at this point in the history
Signed-off-by: sudhanshu dasgupta <[email protected]>
  • Loading branch information
sudhanshutech committed Feb 12, 2024
1 parent b25d9d3 commit 0414f0f
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build-and-preview-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and Preview Site
on:
pull_request:
branches: [ master ]
types: [opened, synchronize, reopened]


jobs:
site-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@master
with:
persist-credentials: false
fetch-depth: 1

- name: Install and Build 🔧
run: |
npm install
npm run noIndex
- name: Zip Site
run: bash ./script.sh

- name: Upload files
uses: actions/upload-artifact@master
with:
name: public-dir
path: ./public-dir.zip
retention-days: 1
- name: Triger Inner workflow
run: echo "trigering inner workflow"
15 changes: 13 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,19 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Install Netlify CLI
run: npm install -g netlify-cli
- name: Download Site dir
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{ secrets.GH_ACCESS_TOKEN }}
workflow: build-and-preview-site.yml
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 to Netlify
id: netlify
Expand Down

0 comments on commit 0414f0f

Please sign in to comment.