JangHwan.Park
JangHwan.Park

Reputation: 17

Build GitPages Using GitHub Actions

.github - workflows - github-pages.yml and dry-run.yml


name: Deploy to GitHub Pages

on:
  pull_request:
    branches:
      - master

jobs:
  github-pages:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: helaili/[email protected]
        build_only: true
Footer

name: Deploy to GitHub Pages

on:
  push:
    branches:
      - master

jobs:
  github-pages:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses:  helaili/jekyll-action@v2
        with:
          token: ${{ secrets.GITHUB_TOKEN }}

Git Actions result
Auto-regeneration: disabled. Use --watch to enable.
Jekyll build done
Error: Cannot publish on branch master

master(Default branch) gh-pages(Active branches) I am using two branches.
What is the workaround for the bug?

Upvotes: 0

Views: 75

Answers (1)

Paul Mahardika
Paul Mahardika

Reputation: 109

Maybe you should change

on:
  push: 
    branches: 
      - master

to another branch

Upvotes: 1

Related Questions