githubtraining / introduction-to-github

Course repo for Learning Lab course "Introduction to GitHub". Template repo ➡️
https://github.com/githubtraining/caption-this-template
Creative Commons Attribution 4.0 International
77 stars 54 forks source link

Pages URL Not GHES Friendly #37

Closed amyschoen closed 4 years ago

amyschoen commented 4 years ago

The pages URL is hard-coded to only work for .com. It needs to be corrected for GHES.

https://github.com/githubtraining/introduction-to-github/blob/master/responses/reminder-delete.md

I don't know the proper variables but it's likely to be something similar to what we do in the scripts for the GitHub for Developers course unless there's a better way that would work for both. The info is being used in one of the earlier steps as {{ pagesUrl }}, but that is passed to the step in question and doesn't seem to persist.

.com: https://${CLASS_ORG}.github.io/${REPO_NAME} GHES: https://${ROOT_URL}/pages/${CLASS_ORG}/${REPO_NAME}

/cc @crichID @brianamarie @hectorsector @JasonEtco

hectorsector commented 4 years ago

Thanks for the report, @amyschoen! We can grab the URL from the API like we do in the config:

https://github.com/githubtraining/introduction-to-github/blob/5b30c5e8e9ca62fb31bd4203efc60991cc57b804/config.yml#L86-L95

amyschoen commented 4 years ago

Nice. The variables aren't well published. It'll be nice to not have to bring in changes to the repo every time we upgrade locally.