'Do I need the pages-build-deployment Github Action, when I have another action for my Github Pages?

In the settings I've enabled Github Pages:

Settings

I have a Github Action which builds and deploy the page to the branch gh-pages.

name: Continuous Deployment

on:
  push:
    branches:
      - master
  schedule:
    - cron: '0 0 * * *'

jobs:
  build-and-deploy:
    name: Build and deploy to Github Pages
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repo
        uses: actions/checkout@v3
      - name: Use nodejs
        uses: actions/setup-node@v3
        with:
          node-version: '16.x'
      - name: Get yarn cache directory path
        id: yarn-cache-dir-path
        run: echo "::set-output name=dir::$(yarn cache dir)"
      - name: Activate dependency cache
        uses: actions/cache@v3
        id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
        with:
          path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
          restore-keys: |
            ${{ runner.os }}-yarn-
      - name: Install dependencies
        run: yarn install --frozen-lockfile
      - name: Caching Gatsby
        id: gatsby-cache-build
        uses: actions/cache@v3
        with:
          path: |
            public
            .cache
          key: ${{ runner.os }}-gatsby-build-cache-${{ github.run_id }}
          restore-keys: |
            ${{ runner.os }}-gatsby-build-cache-
      - name: Build website
        run: yarn build:with-prefix
        env:
          PATH_PREFIX: '/xyz'
          SITE_URL: 'https://xyz.github.io/xyz'
          CI: true
      - name: Deploy to GitHub Pages
        uses: JamesIves/[email protected]
        with:
          branch: gh-pages
          folder: public
          clean: true

Now there is another Github Action which seem to deploy my page to Github Actions (using Jakyll):

Github Actions

Now I have two questions, which I couldn't answer by searching the internet:

  1. Do I need this other action pages-build-deployment?
  2. If not, how can I disable it?


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source