From 71d2c3013097eefa5635621da3f49ce71ec5c689 Mon Sep 17 00:00:00 2001 From: Tanimul Haque Khan Date: Tue, 7 Sep 2021 13:58:48 +0600 Subject: [PATCH] Create CI-CD.yml --- .github/workflows/CI-CD.yml | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/CI-CD.yml diff --git a/.github/workflows/CI-CD.yml b/.github/workflows/CI-CD.yml new file mode 100644 index 0000000..1ccf724 --- /dev/null +++ b/.github/workflows/CI-CD.yml @@ -0,0 +1,41 @@ +name: Build and Publish to gh-pages branch + +on: + push: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v1 + with: + node-version: '14' + cache: 'npm' + cache-dependency-path: subdir/package-lock.json + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: | + **/node_modules + key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} + + - name: Install dependencies + run: npm install + + - name: Build + run: npm run build + env: + CI: "" + + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@4.1.4 + with: + branch: gh-pages + folder: build