# Builds the Next.js site and deploys it to Firebase hosting
name: Deploy each push
on:
  push:
    branches: [master]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1

      # - name: Build site
      #   uses: docker://jekyll/builder:4.1.0
      #   with:
      #     args: jekyll build

      - name: Archive built site
        uses: actions/upload-artifact@v2
        with:
          name: site
          path: out

  deploy:
    name: Deploy
    needs: build
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repo
        uses: actions/checkout@v1

      - name: Download Artifact
        uses: actions/download-artifact@v2
        with:
          name: site
          path: out

      - name: Deploy to Firebase
        uses: w9jds/firebase-action@master
        with:
          args: deploy --only hosting
        env:
          FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}

# Builds the Next.js site and deploys it to Firebase hosting
name: Deploy each push
on:
  push:
    branches: [master]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout 🛎️
        uses: actions/checkout@v2
        with:
          persist-credentials: false

      # See https://github.com/actions/cache/blob/main/examples.md#node---yarn
      - name: Get yarn cache directory path
        id: yarn-cache-dir-path
        run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

      - uses: actions/cache@v2
        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 and Build 🔧
        uses: actions/setup-node@v1
        with:
          node-version: "15.x"
      - run: yarn install
      - run: yarn run build
        # env:
        #   CI: false

      - name: Archive built site
        uses: actions/upload-artifact@v2
        with:
          name: site
          path: out

  deploy:
    name: Deploy
    needs: build
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repo
        uses: actions/checkout@v1

      - name: Download Artifact
        uses: actions/download-artifact@v2
        with:
          name: site
          path: out

      - name: Deploy to Firebase
        uses: w9jds/firebase-action@master
        with:
          args: deploy --only hosting
        env:
          FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}

Change github action to build next.js site instead of jekyll
Change github action to build next.js site instead of jekyll
