helaili / jekyll-action

A GitHub Action to publish Jekyll based content as a GitHub Pages site
MIT License
250 stars 120 forks source link

Cannot publish on branch #74

Closed polyrain closed 3 years ago

polyrain commented 3 years ago

Hi, I get an error when I try and use this action. Output below:

Configuration file: /github/workspace/_config.yml
96
            Source: /github/workspace
97
       Destination: /github/workspace/build
98
 Incremental build: disabled. Enable with --incremental
99
      Generating... 
100
       Jekyll Feed: Generating feed for posts
101
                    done in 0.128 seconds.
102
 Auto-regeneration: disabled. Use --watch to enable.
103
Jekyll build done
102
Error: Cannot publish on branch master
polyrain commented 3 years ago

Update: If following guide on the jekyll site, use this optional argument in your workflow:

    # Specify the target branch (optional)
    - uses: helaili/jekyll-action@v2
      env:
        JEKYLL_PAT: ${{ secrets.JEKYLL_PAT }}
      with:
        target_branch: 'gh-pages'