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

Push CNAME #6

Merged
merged 2 commits into from
Mar 18, 2019
Merged

Push CNAME #6

merged 2 commits into from
Mar 18, 2019

Conversation

JamesIves
Copy link
Owner

@JamesIves JamesIves commented Mar 18, 2019

Description

Provide a description of what your changes do.

Kept running into this issue this weekend with Liza's portfolio site. If you deploy via this action with a custom domain, Github will nuke the configuration for the domain as the CNAME file is no longer present in the gh-pages branch. In order to solve this I've added an additional environment variable called CNAME which will add the domain record into the build directory prior to the deploy. This will maintain the GitHub configuration which will solve the issue of pages 404ing after the deploy.

Testing Instructions

Give us step by step instructions on how to test your changes.

  • Add a CNAME record, and deploy. If you have a custom domain it will no longer 404 after the deploy.
  • Tested this using https://reddit-viewer.jives.dev.

@JamesIves JamesIves merged commit 22b935f into master Mar 18, 2019
@JamesIves JamesIves deleted the cname branch March 18, 2019 04:02
@Mister-Hope
Copy link

Excuse me, why do we cancel the CNAME option in the newest version?
Is there any benifit for us to make an extra commit to the deploy branch instead of writing it in the config file? @JamesIves

@JamesIves
Copy link
Owner Author

@Mister-Hope This is an old feature that was removed as the action now maintains the full git history. Just commit the CNAME file once and it will be there forever, there's no need to commit it each time now.

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

Successfully merging this pull request may close these issues.

2 participants