Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support: Github Pages not deployed, even when action is successfull #961

Closed
3 tasks done
anticdimi opened this issue Aug 18, 2023 · 7 comments
Closed
3 tasks done
Assignees
Labels

Comments

@anticdimi
Copy link

Checklist

  • I am using the latest version of this action.
  • I have read the latest README and followed the instructions.
  • I have read the latest GitHub Actions official documentation and learned the basic spec and concepts.

Describe your question

Hi @peaceiris ,
Thank you for your work, it really is useful!

My website can't deploy correctly. It seems like the public/dir is not created in the correct location (see the log output bellow).
Any hints on how to solve this?

Relevant links

Public repository: /
YAML config: 

name: Deploy GitHub Pages

on:
  push:
    branches:
      - main 
  pull_request:

jobs:
  deploy:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    concurrency:
      group: ${{ github.workflow }}-${{ github.ref }}
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: true  # Fetch any Git submodules (true OR recursive)
          fetch-depth: 0    # Fetch all history for .GitInfo and .Lastmod

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

      - name: Build
        run: hugo --minify

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


YAML workflow:

Relevant log output

[INFO] copy /home/runner/work/anticdimi.github.io/anticdimi.github.io/public to /home/runner/actions_github_pages_1692352328176
cp: no such file or directory: /home/runner/work/anticdimi.github.io/anticdimi.github.io/public/.*

Additional context.

No response

@anticdimi anticdimi added the support User support label Aug 18, 2023
@Darker
Copy link

Darker commented Aug 19, 2023

I have the same problem. This is my log:

  [INFO] ForceOrphan: false
  /usr/bin/git clone --depth=1 --single-branch --branch gh-pages ***github.com/Darker/battletech-techsheet.git /home/runner/actions_github_pages_1692478804848
  Cloning into '/home/runner/actions_github_pages_1692478804848'...
  [INFO] clean up /home/runner/actions_github_pages_1692478804848
  [INFO] chdir /home/runner/actions_github_pages_1692478804848
  /usr/bin/git rm -r --ignore-unmatch *
  rm '.nojekyll'
  [INFO] chdir /home/runner/actions_github_pages_1692478804848
  [INFO] prepare publishing assets
  [INFO] copy /home/runner/work/battletech-techsheet/battletech-techsheet/web/root to /home/runner/actions_github_pages_1692478804848
  cp: no such file or directory: /home/runner/work/battletech-techsheet/battletech-techsheet/web/root/*
  cp: no such file or directory: /home/runner/work/battletech-techsheet/battletech-techsheet/web/root/.*
  [INFO] delete excluded assets
  rm: no paths given
  [INFO] Created /home/runner/actions_github_pages_1692478804848/.nojekyll

The only file that ends up in gh-pages branch is the .nojekyll file created at the end.

@peaceiris
Copy link
Owner

@anticdimi Your ./public looks empty, I think.

@Darker Your ./web/root looks empty too.

@peaceiris
Copy link
Owner

Here is my new example repo. FYI https://github.com/peaceiris/test-mdbook

@Darker
Copy link

Darker commented Aug 20, 2023

I may have misunderstood the purpose of this action. I thought it would publish from master to gh-pages. I have in the meantime resolved this by using a different action. Byt my web/root in master was not empty: https://github.com/Darker/battletech-techsheet/tree/master/web/root

@anticdimi
Copy link
Author

Hi @peaceiris ,
I don't think that is the case, because when I run hugo --minify on my local machine, the ./public dir actually contains the website content.

@anticdimi
Copy link
Author

I have also solved this issue by using a different deployment method.

@github-actions
Copy link
Contributor

This issue has been LOCKED because of it being resolved!

The issue has been fixed and is therefore considered resolved.
If you still encounter this or it has changed, open a new issue instead of responding to solved ones.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants