martinthomson / i-d-template

A template for IETF internet draft git repositories
Other
208 stars 182 forks source link

gh-pages created in a sub-directory with gh actions #199

Closed jam01 closed 4 years ago

jam01 commented 4 years ago

Hey Martin, was wondering if you could help me figure out if this is an usage issue or one with the gh-pages script.

When setting up cicd with GitHub's new Actions I'm seeing some strange behavior where the pages generated are created in a subdirectory of the gh-pages branch instead of replacing those at the root.

the resulting gh-pages: https://github.com/phtal-org/internet-draft-xrel/tree/gh-pages the offending commit: https://github.com/phtal-org/internet-draft-xrel/commit/3c6cbfe4c08835cc9109c681307c645562b0937c the cicd script: https://github.com/phtal-org/internet-draft-xrel/blob/master/.github/workflows/pipeline.yml

Thanks for the template! :+1:

edit: the pipeline run with logs: https://github.com/phtal-org/internet-draft-xrel/commit/ed02e69e55205ffa889481428114fe352561e28a/checks?check_suite_id=272531502

martinthomson commented 4 years ago

I think that I can see what is going on here. The build for pages throws output into subdirectories when it detects that you are not on master. The code is here: https://github.com/martinthomson/i-d-template/blob/master/ghpages.mk#L11-L16

Nice work with getting a start on Actions. I haven't had the time to work out what that takes, but this looks like a good start. For this specific bug, I think that you just need to modify the code above to work with whatever indicators Actions provide about the active branch.

jam01 commented 4 years ago

Hey Martin, just wanted to point out that PR https://github.com/martinthomson/i-d-template/pull/201 addresses this issue. I realized I never related the two and just made the PR with 0 description.

jam01 commented 4 years ago

Closing per https://github.com/martinthomson/i-d-template/pull/201#issuecomment-657344879