Github Actions on user's Github Pages site (

Hello. I would like to ask for some help regarding using GitHub Actions on a user’s GitHub Pages site (in my case, I have the following file on .github/workflows/deploy.yml:

name: deploy

      - main  # Set a branch to deploy

    runs-on: ubuntu-18.04
      - uses: actions/checkout@v2
          submodules: true  # Fetch Hugo themes (true OR recursive)
          fetch-depth: 0    # Fetch all history for .GitInfo and .Lastmod

      - name: Setup Hugo
        uses: peaceiris/actions-hugo@v2
          hugo-version: '0.75.1'
          extended: true

      - name: Build
        run: hugo --minify

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./public
          publish_branch: gh-pages

This should perform some action when I push anything to master (and the file is indeed present in master) such that it compiles the website and pushes to gh-pages. However, whenever I push, the Actions tab is empty:

Am I doing something wrong here? Or are GitHub Actions not allowed on these repositories?

The workflow is set to respond on a push to a branch named main, but your default branch is named master. In general the community has been moving away from the term master for the default branch and both GitHub Pages and Actions now support this, so you’ll either need to change the default branch in your repository from master to main or change the action to respond on the branch named master.

I… did not notice that. Thank you so much!!

1 Like