Skip to content
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

use github actions/pages instead of manually deploying to a new branch #17

Open
gschare opened this issue Apr 13, 2021 · 0 comments
Open
Assignees
Labels
question Further information is requested

Comments

@gschare
Copy link
Collaborator

gschare commented Apr 13, 2021

I'm not totally comfortable with the deploy.sh script we're using:

SITE_DIR="issue-tracker-archive/"
SITE_BRANCH="gh-pages"

bash update.sh
runhaskell build.hs

git add $SITE_DIR
git commit -m "Build site"
git push -d origin $SITE_BRANCH
git subtree push --prefix $SITE_DIR origin $SITE_BRANCH
git reset HEAD~1

This feels unstable because it somewhat abuses Git commits in order to get it to work.
Of course, the reason why this appears to be necessary is that GitHub pages only allows us to host the site either using their Jekyll integration or simply by making the entire repo public, which is not what we want. We want to generate a folder of static files and then serve just that folder, and the code above does that by sending the generated folder to a new branch, pushing that branch, and then resetting to before it was generated.
I wonder if there is a clean way to achieve this using GitHub Actions. This would be simple if it was clear by what process GitHub takes the content in the repo and deploys it, but alas I cannot find useful documentation for how to wrangle GitHub Pages deployment in the way that we need. Actually, the simplest way would be if GitHub allowed us to choose a particular folder to serve from, but for reasons I do not understand, we are only allowed to serve from root or /docs.
Of course, we could just serve from /docs... but that also feels like a workaround when there must be a way to do this simply!
In the meantime we can continue with the deployment script.

@gschare gschare added the question Further information is requested label Apr 13, 2021
@gschare gschare self-assigned this Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant