GithubHelp home page GithubHelp logo

Comments (12)

MitchTalmadge avatar MitchTalmadge commented on July 21, 2024 1

Sorry for the delay. The link is:
https://github.com/MitchTalmadge/Portfolio/edit/master/.github/workflows/web-deployment.yml

However you probably won't be able to edit this unless you fork my repo. Try it on your own workflow and it'll probably work. When editing in the GitHub website, a marketplace search area appears on the right. Search for your action and you will see the version mismatch. I made a recording to illustrate this:

recording

I reported it to GitHub

from ghaction-github-pages.

ChildishGiant avatar ChildishGiant commented on July 21, 2024 1

Yeah, I realised the issue now. It's not my project so I wanted to leave it as is but it's ridiculous to generate it all in the root and publish that so I'm going to modify everything to be in a subfolder. Thanks for all the help 😄

from ghaction-github-pages.

crazy-max avatar crazy-max commented on July 21, 2024

Hi @MitchTalmadge

Use crazy-max/ghaction-github-pages@v1 instead of crazy-max/[email protected]

from ghaction-github-pages.

MitchTalmadge avatar MitchTalmadge commented on July 21, 2024

@crazy-max Thanks! That was simple.

It looks like GitHub's action editor is broken and suggests using 0.1.0 no matter which version is selected in the marketplace search:

image

I wonder how I can report this.

from ghaction-github-pages.

crazy-max avatar crazy-max commented on July 21, 2024

@MitchTalmadge Thanks for your report I will take a look at this!

from ghaction-github-pages.

crazy-max avatar crazy-max commented on July 21, 2024

@MitchTalmadge Can you give me the link of your screenshot please? For me it looks like:

image

I think I will add a note at the top of the README on the versioning of the action. On your side you can report this problem to GitHub which seems to be a bug by following this link: https://support.github.com/contact

from ghaction-github-pages.

ChildishGiant avatar ChildishGiant commented on July 21, 2024

I'm having issues with this when using v2.2.0

https://github.com/ChildishGiant/materialize/runs/2103118571

Here's the relevant part of the workflow:

  docs:

    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master

      - name: Generate docs
        run: |
          npm i
          npm run docs
      - name: Deploy to GitHub Pages
        if: success()
        uses: crazy-max/[email protected]
        with:
          target_branch: gh-pages
          build_dir: ./
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

from ghaction-github-pages.

crazy-max avatar crazy-max commented on July 21, 2024

@ChildishGiant Looking at your workflow, the build_dir is odd (build_dir: ./). I think it should be build_dir: public in your case.

from ghaction-github-pages.

ChildishGiant avatar ChildishGiant commented on July 21, 2024

The files are generated in the current folder, not one called public though?

from ghaction-github-pages.

crazy-max avatar crazy-max commented on July 21, 2024

@ChildishGiant

The files are generated in the current folder, not one called public though?

build_dir is relative to your workspace on the GitHub Runner. In this case your git root repository (./): https://github.com/ChildishGiant/materialize/tree/GHA.

I don't think npm run docs will generate your html files in the root folder but something like ./public.

from ghaction-github-pages.

ChildishGiant avatar ChildishGiant commented on July 21, 2024

It does generate them in the root but I'm having a similar issue with another action too. Removing the gitignore rule that blocks them from being commited seems to fix it so I guess from one step to another the gitignore is somehow applied? I can do an ls and they show up though.

from ghaction-github-pages.

crazy-max avatar crazy-max commented on July 21, 2024

@ChildishGiant

Removing the gitignore rule that blocks them from being commited seems to fix it so I guess from one step to another the gitignore is somehow applied?

That's not the right way. Your documentation should not be generated in the root folder of the repository but a dedicated sub folder. If you generate the documentation in the root folder and want to push to GitHub Pages with this action, everything (source code, node_modules, ...) will be pushed. You only want your documentation to GitHub Pages (generated files).

See for example this workflow using Hugo to generate html files. By default Hugo generate files in a public folder and this is what will be pushed to the GitHub Pages branch and not the source branch.

What do you use to generate your documentation? Can you specify a custom output folder?

from ghaction-github-pages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.