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

Clarity around automated deployment to gh-pages #454

Closed
NullVoxPopuli opened this issue Feb 10, 2020 · 7 comments
Closed

Clarity around automated deployment to gh-pages #454

NullVoxPopuli opened this issue Feb 10, 2020 · 7 comments

Comments

@NullVoxPopuli
Copy link

NullVoxPopuli commented Feb 10, 2020

I've had a couple confusions with the deployment process, and am wondering if others have had the same issue.

When I first started the project, I had to manually create the gh-pages branch.. but I also had to make sure it was an empty branch -- delete all my repository files -- as I don't need addon source deploy as if it's a website. There is no home index.html though: https://github.com/NullVoxPopuli/ember-jsqr/tree/gh-pages I haven't yet dug in to this to see what could be wrong. I suspect it may have something going wrong around this code: https://github.com/ef4/ember-cli-deploy-git/blob/master/index.js#L44 (one of the ember-cli-deploy plugins addon-docs uses)

So, idk if other people have had these issues, and additions to the guides would be helpful?

  • create empty gh-pages branch before deploying
  • ?? (whatever I need to do to fix the root index.html (and related assets) missing issue

Update (maybe not directly related to deployment, but I am using GH Actions with all this)

Forgot that I also had to do this in the GH Action

run: echo "::set-env name=ADDON_DOCS_VERSION_PATH::${GITHUB_REF##*/}"

related: #437

@RobbieTheWagner
Copy link
Member

The addon docs default is to only publish a version, and not overwrite the root. If you run ADDON_DOCS_UPDATE_LATEST=true ember deploy production it should force it to overwrite the root.

@NullVoxPopuli
Copy link
Author

Ah, that's what that means. Cool. I'll give it a go! Thanks!

@NullVoxPopuli
Copy link
Author

also, I had to do this:

        run: echo "::set-env name=ADDON_DOCS_VERSION_PATH::${GITHUB_REF##*/}"

for github actions.
(just documenting stuff for others to find it quicker)

@RobbieTheWagner
Copy link
Member

Definitely feel free to open a PR to talk about GitHub actions in the official docs 😃

@NullVoxPopuli
Copy link
Author

Once I figure out a good setup, I def will!

@NullVoxPopuli
Copy link
Author

Yay, the root of my gh-pages has content now! https://github.com/NullVoxPopuli/ember-jsqr/tree/gh-pages

@jkeen
Copy link
Contributor

jkeen commented Aug 20, 2021

Also running into trouble with some of this setup. I've got a custom domain for my gh-pages site, and it github wants you to put a CNAME file at the root. I tried adding that manually to the gh-pages root (seemed like a good idea at the time) but then every time I deployed that file it would get deleted and would knock the site offline.

Turns out you need to stick that CNAME file in /tests/dummy/public in your addon as I discovered from deep within the ember discord. Adding this comment for future travelers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants