htl-leonding-college / asciidoctor-docker-template

A template project for creating doc-as-code with docker
https://htl-leonding-college.github.io/asciidoctor-docker-template/
14 stars 16 forks source link

Commit to gh-pages branch by default #2

Closed stefnotch closed 4 years ago

stefnotch commented 4 years ago

It'd be neat if this script would switch to the gh-pages branch, commit and push the files there and then switch back.

That way, autogenerated files won't clutter the git history.

stefnotch commented 4 years ago

Redirect html file

<!DOCTYPE HTML>
<html lang="en-US">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="refresh" content="1;url=docs/index.html">
        <title>Page Redirection</title>
    </head>
    <body>
        If you are not redirected automatically, <a href="docs/index.html">click here</a>
    </body>
</html>
stefnotch commented 4 years ago

Leaving everything on the master branch in the current config is rather troublesome, because it really clutters up everything.

stefnotch commented 4 years ago

Apparently the usual way of doing this is something like this. It basically force pushes a folder to the gh-pages branch.

Here in an npm package which does exactly that

htl-leonding commented 4 years ago

Thank you for this suggestion. The link was great. All is working now. The gh-pages are in an own branch now. I removed the scripts for pdf and slides. The pdf skript will return after refactoring, for the slides I will create a new repo.