peaceiris/actions-gh-pages

Weird nesting of content folders in HUGO build

hathawayj opened this issue · 6 comments

Describe the bug

I am not sure what is happening, but it may be related to your last commit - https://github.com/peaceiris/actions-gh-pages/blob/main/CHANGELOG.md.

When the website is built locally, I can see the correct folder structure, and the website renders correctly. However, when I push to Github, it creates a nested directory.

When using the second link, it shows Day 7 and Day 8, but the links don't navigate correctly.

To Reproduce

Not sure here.

  1. Commit a new file under slides.
  2. Watch it break...

Expected behavior

I expected to see each day in the primary slides page.

Screenshots

masterScreenshot_2020-10-08_20-55-29

Screenshot_2020-10-08_20-59-39

Your YAML file

################################# Default configuration ###################
# provide your domain here
baseURL = "https://byuistats.github.io/CSE250-Course"
# https:byuistats.github.io/CSE250-Course
# theme
theme = "Dot"
# site title
title = "CSE250"
# disable language
disableLanguages = [true]
# google analytics fake for this
googleAnalytics = "UA-1dkjdfd79739389834-4" 
publishDir = 'docs'
# unsafe html
[markup.goldmark.renderer]
unsafe= true

################################# navigation ################################
[[menu.main]]
name = "Faq"
url = "faq"
weight = 1

[[menu.main]]
name = "Contact"
url = "contact"
weight = 2

# Dropdown menu
[[menu.main]]
weight = 3
name = "Navigate"
hasChildren = true

  [[menu.main]]
  parent = "Navigate"
  name = "Projects"
  url = "projects"
  weight = 1

  [[menu.main]]
  parent = "Navigate"
  name = "Slides"
  url = "slides"
  weight = 2

  [[menu.main]]
  parent = "Navigate"
  name = "Course Materials"
  url = "course-materials"
  weight = 3

  [[menu.main]]
  parent = "Navigate"
  name = "Syllabus"
  url = "course-materials/syllabus/"
  weight = 3

############################# Default Parameters ##########################
[params]
# logo is for all page
logo = ""
# logo white is for homepage logo, you can use colorful logo too...
logo_white = ""
# when logo is empty, it will shown your site title

# customize color
primary_color = "#02007e"
body_color = "#f9f9f9"
text_color = "#636363"
text_color_dark = "#242738"
white_color = "#ffffff"
light_color = "#f8f9fa"

# font family
font_family = "roboto" # Choose font family from : https://fonts.google.com/



############################## social links ##############################
 
[[params.social]]
icon = "ti-github" # themify icon pack : https://themify.me/themify-icons
link = "https://github.com/byuidatascience"
  
[[params.social]]
icon = "ti-linkedin" # themify icon pack : https://themify.me/themify-icons
link = "https://www.linkedin.com/groups/13537407/"

################################ English Language ######################
[Languages.en]
languageName = "En"
languageCode = "en-us"
weight = 1
home = "Home"
copyright = "J. Hathaway and BYU-I ©"

# banner
[Languages.en.params.banner]
title = "CSE 250: Data Science Programming"
subtitle = "Using pandas, Altiar, scikit-learn, and NumPy to program with data"
bg_image = "images/banner.png"
placeholder = "Have a question? Just ask here or enter terms"

Additional context

Please share your GitHub Actions workflow YAML file, not Hugo's config file.

Sorry for the mistake.

name: CI
on: push
jobs:
  deploy:
    runs-on: ubuntu-18.04
    steps:
      - name: Git checkout
        uses: actions/checkout@v2

      - name: Setup hugo
        uses: peaceiris/actions-hugo@v2
        with:
          hugo-version: "0.74.3"

      - name: Build
        # remove --minify tag if you do not need it
        # docs: https://gohugo.io/hugo-pipes/minification/
        run: hugo --minify

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        with:
          personal_token: ${{ secrets.TOKEN }}
          publish_dir: ./docs
          keep_files: true
          user_name: hathawayj
          user_email: hathawayj@gmail.com
        #   cname: example.com

Why keep_files: true? You seem to not need it. By removing it, your problem will be solved.

Great! That fixed it. It hasn't been an issue up to this point. Did something change? I appreciate the quick response.

Thank you for reporting it. This is related to the changes for #324. I will track this at #324.

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.