From 9c324acddf532d19a0dad13e05edd44ea272e7ce Mon Sep 17 00:00:00 2001 From: Ariful Alam Date: Fri, 18 Mar 2022 23:33:18 +0600 Subject: [PATCH] Update deploy action file --- .github/workflows/CI-CD.yml | 39 ------------------------------------ .github/workflows/deploy.yml | 38 +++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 39 deletions(-) delete mode 100644 .github/workflows/CI-CD.yml create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/CI-CD.yml b/.github/workflows/CI-CD.yml deleted file mode 100644 index 214e475..0000000 --- a/.github/workflows/CI-CD.yml +++ /dev/null @@ -1,39 +0,0 @@ -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 - uses: actions/setup-node@v2 - with: - node-version: '14' - - - 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 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..fc66364 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,38 @@ +name: Deploy to gh-pages Branch + +on: + push: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: 16.x + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: | + **/node_modules + key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + env: + CI: '' + + - name: Deploy + uses: JamesIves/github-pages-deploy-action@v4 + with: + branch: gh-pages + folder: build