Skip to content

Commit

Permalink
fix: added new yml for dev
Browse files Browse the repository at this point in the history
  • Loading branch information
TharinduX committed Oct 28, 2023
1 parent daa8571 commit 35ecc88
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 6 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Branch Preview

on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-latest
permissions:
deployments: write
steps:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18.18.0
- uses: actions/checkout@v4
- name: Cache node modules
uses: actions/cache@v2
with:
path: |
**/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
**/package-lock.json
- name: Install dependencies
run: |
npm ci
- name: Build and Deploy to Netlify
run: |
netlify deploy --prod --build
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_DEV_SITE_ID }}
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Branch Preview Comment
name: PR Preview Comment

on:
push:
branches-ignore:
- main
pull_request:
types:
- opened
Expand Down Expand Up @@ -31,7 +28,7 @@ jobs:
restore-keys: |
**/package-lock.json
- name: Install dependencies
run: npm install
run: npm ci
- name: Build & Deploy to Netlify
id: netlify_deploy
run: |
Expand Down

0 comments on commit 35ecc88

Please sign in to comment.