Skip to content
This repository has been archived by the owner on Sep 24, 2022. It is now read-only.

Create build.yml #5

Merged
merged 12 commits into from
Oct 25, 2020
Merged

Create build.yml #5

merged 12 commits into from
Oct 25, 2020

Conversation

Loquacity
Copy link
Member

@Loquacity Loquacity commented Sep 20, 2020

Adds GH action for using tweego to compile twee files and publish to gh-pages

Still todo: create README for the GH-action

@Loquacity
Copy link
Member Author

Copy link

@jaredmorgs jaredmorgs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not totally sure what you want me to review here @Loquacity

@Loquacity
Copy link
Member Author

Loquacity commented Sep 22, 2020

This PR adds the github action, which looks for the .tw file in the ia-guide directory, installs tweego (the compiler), compiles the file, then outputs the resulting HTML file to the gh-pages branch.

@Loquacity
Copy link
Member Author

Loquacity commented Sep 22, 2020

The interesting part is in the "Checks" tab ;)

image

@Loquacity
Copy link
Member Author

This means that people with no experience with twine/tweego/chapbook can update the .tw file as required, and the gh action will update the mini-site automatically for us.

@mgan59
Copy link

mgan59 commented Sep 23, 2020

@Loquacity I think you are close on this action, but not sure if the file generated at f86aab4/dist/ia-cyoa.html is part of the commit and not actually from the build/action. There might be more to do here to get preview links setup as the gh-action should give some direct-link. This might be easier to setup a netlify build/preview.

@Loquacity
Copy link
Member Author

Loquacity commented Sep 23, 2020

@Loquacity I think you are close on this action, but not sure if the file generated at f86aab4/dist/ia-cyoa.html is part of the commit and not actually from the build/action. There might be more to do here to get preview links setup as the gh-action should give some direct-link. This might be easier to setup a netlify build/preview.

Yeah, I was wondering about that. It's definitely created the gh-pages branch. I was wondering if it had to do with the fact that it's not actually merged yet, though. I don't know anything about netlify, so feel free to take it in a different direction!

@jaredmorgs
Copy link

OK to merge after @mgan59 verifies Lana's comments above.

@mgan59
Copy link

mgan59 commented Oct 14, 2020

👋 circling back to drive it forward 😄

@mgan59
Copy link

mgan59 commented Oct 14, 2020

@Loquacity ok, figured this out to some degree.

  1. This is the readme: for the github-action so looks like it is working, in that on a merge to master it will build your tweego content into the /ia-cyoa.html. Thats the plan anyways -- not sure if the action is fully doing this yet, but think we can get it there.

  2. We need to create a new CNAME Record for this repository Incubator so that the gh-page can actually have a reference. By default it tries to load at https://thegooddocsproject.dev/incubator which clashes with the marketing site at the thegooddocsproject.github.io repo ... The fix I went into the Settings on this repo and scroll the the bottom there is a panel to create a custom domain.

Screen Shot 2020-10-14 at 6 08 54 PM

There is now a new entry https://incubator-thegooddocsproject.dev/. But it isn't fully working yet. From what I'm gathering github by-default things anything served from the gh-page is a Jekyll site as noted.

With that said, think we need to add a .nojekyll file to the gh-page branch and maybe also drop in an index.html.

@mgan59
Copy link

mgan59 commented Oct 14, 2020

@Loquacity I went ahead and added the .nojekyll file and an index.html. The docs say it can take up to 20 mins for the changes to take .... guess we'll see 😬 🕐

@Loquacity
Copy link
Member Author

Thanks heaps! No dice here at this point:

image

@mgan59
Copy link

mgan59 commented Oct 15, 2020

I see the dns is not resolving still, did some more reading. We need to add a matching CNAME record to our root-dns system to match as indicated here

@Loquacity
Copy link
Member Author

I see the dns is not resolving still, did some more reading. We need to add a matching CNAME record to our root-dns system to match as indicated here

Since I have this served from my personal web server as a test site for now, perhaps we don't need to solve this problem for the incubator. Can we focus on making sure the HTML is building correctly, and then address where it posts it to when we move this into the templates repo?

@emckean
Copy link
Contributor

emckean commented Oct 15, 2020

hi -- when you're ready to push this live/staging I can update the DNS to add the CNAME :)

@Loquacity
Copy link
Member Author

hi -- when you're ready to push this live/staging I can update the DNS to add the CNAME :)

Thanks! We can move this live when the IA Guide is complete. So if @mgan59 is happy that the HTML file is being built properly, I think we can merge this here in incubator, and then when we move it we can work on the publication part of the action.

Copy link

@mgan59 mgan59 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the cyoa.html files has the correct html and renders inside of the gh-page branch so 👍 this github-action works. 💯

There is a followup with managing the domains and being able to see the builds -- much larger discussion for the group 🤔

run: |
go get github.com/tmedwards/tweego
export PATH=$PATH:$(go env GOPATH)/bin
tweego ia-cyoa.tw -o dist/index.html
tweego -f chapbook-1 ia-guide/ia-cyoa.tw -o dist/ia-cyoa.html
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious if you know the specifics on -f chapbook-1 and is cyoa create your own adventure?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from what I was reading chapbook-1 is like a system/format for tweego?

Copy link
Member Author

@Loquacity Loquacity Oct 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, -f is the switch for format. Twine requires a format which allows you to do different things. The default is sugarcube but it's pretty basic, I chose chapbook because it allows you to have text input and better variable handling. FTR, tweego is just the compiler, so it take the Twine file (.twee or .tw), and uses the format (in this case, chapbook) to create the HTML. As for my filenames, I've used ia-cyoa (choose your own adventure) for the interactive version, to differentiate it from ia-static, which is still to come.

@Loquacity Loquacity merged commit 34eb299 into master Oct 25, 2020
@Loquacity Loquacity deleted the GH-actions-tweego branch October 25, 2020 04:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants