Skip to content

gh-pages branch not created? #691

Answered by peaceiris
Aryaman73 asked this question in Q&A
Discussion options

You must be logged in to vote

Here is your workflow.

on:
  push:
    branches:
      - master  # Set a branch to deploy
  pull_request:
...
      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        if: github.ref == 'refs/heads/main'
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./public

You are using master branch as your source branch. Change the filter of the Deploy step.

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
-        if: github.ref == 'refs/heads/main'
+        if: github.ref == 'refs/heads/master'
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./public

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Aryaman73
Comment options

Answer selected by Aryaman73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants