-
Notifications
You must be signed in to change notification settings - Fork 74
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
Confusing README? #6
Comments
Thank you for the feedback and taking time to write it here! We will be making some improvements on the README. |
Thanks @BrutalCoding! That got my setup working. A better documentation would be much appreciated 👍 |
Thanks @BrutalCoding — this issue is the readme that should have been! |
Just FYI for anyone else who tried to use the sample code from the issue above but got hit with You need to update Maybe this could be changed in the issue text as well so people don't have to waste time piecing it together. |
@smheidrich comments like this are helpful! Thanks, and I fully agree. I took your advice and have now edited my original issue text. I added a new note that is hopefully generalized enough that it should last for many more years to come. edit This is a perfect example of why double checking the latest docs and/or official examples is the best thing to do. PS. I wasn't aware of the shear amount of people that found my original insight useful. Cool to see! |
Context
First off, thanks, I've managed to make use of this action within my own custom GH Action workflow and it works perfect. Sorry for the long post, because the solution is very simple but I just wanted to give you my experience.
How I got to this repo.
Got started. Got confused.
"Usage" says: see action.yml
Time to get started, I edited my GH action workflow ("on pull request") to include step 4. I started by reading the README and under the header
Usage
there's a reference toaction.yml
. I was not familiar to other GitHub Action repos in general so I did not know thataction.yml
is the starting point of the action. I thought that this file was an example of how to make use of this action. I was wrong.So here's me making use of
actions/upload-artifact@main
instead ofactions/upload-pages-artifact@v1
because I found on that on the bottom ofaction.yml
. My mistake..Successfully uploaded artifacts. No github-pages environment.
Even though I made use of the wrong action, it did upload my artifacts. The logs mentioned that my artifacts got uploaded. But I couldnt find it in my environment nor did I see it on my GitHub Pages link.
Finally got it
After hours of trying and debugging I ended up with actions/deploy-pages's README. That README mentions that the
action.yml
can be read to learn about the various inputs that it supports and most importantly it mentions examples to be found here: https://github.com/actions/starter-workflows/tree/main/pagesSo I checked out the examples, went for static.yml and noticed these 3 steps:
So thats it. I used the same actions in the same order and everything worked.
Can we update the README to make this more clear too? Thats all 😆
edited @ Sep 2024:
Heya future reader! It might be obvious to some, but my text and/or code is likely not up-to-date by the time you're reading this.
As of now, it's Sep 2024 and I stumbled upon a friendly commenter that mentioned that you should update the version number that I used before. Please check the latest documentation and versions numbers yourself, after that you likely will do something like this:
Change
actions/upload-pages-artifact@v1
toactions/upload-pages-artifact@v4
The first thing that you should do, and this is applicable to any kind of code project, is simply follow along with the latest official instructions. This is better than following along with a dated video tutorial or article. Thus, in this case, make sure you read this README.md: https://github.com/actions/upload-artifact?tab=readme-ov-file.
Secondly, remember that README's are just text files - not code. Thus, they may have typo's in any of the included example codes found in the README. So, if you followed all the instruction and it didn't work as expected - try to browse the project to find real example code files. Thus again, since we're talking about actions/upload-pages-artifact, check out this file: https://github.com/actions/upload-pages-artifact/blob/main/action.yml. Even code files can have typo's too of course, but that'd called a bug and that is often way more noticable compared to having a typo in an informational text file (e.g. README.md).
The text was updated successfully, but these errors were encountered: