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