New git sync removes github custom domain
-
November 13, 2023 at 9:40 pm #11001[anonymous]
Hi, the new sync method seems to remove custom domains from github pages.
Your custom domain is stored inside a file called CNAME in the root of the repository. When syncing the site to github, that that file is removed again and the custom domain no longer works. As a workaround, the custom domain can be set again after synchronizing.
However, publii should either merge, ignore or create that file on it’s own (untested).
Thank you very much for pulii!!!
Kind regards, JΓΆrg
November 13, 2023 at 10:27 pm #11004[anonymous]Hi,
Did you tried to put CNAME file under Tools -> File Manager -> root files? π
November 13, 2023 at 10:34 pm #11006[anonymous]Hey Tomasz,
this works!
Thanks a lot!
November 13, 2023 at 11:13 pm #11007[anonymous]Tomasz Dziuda wrote:Hi,
Did you tried to put CNAME file under Tools -> File Manager -> root files? π
Hello, I tried this and:
- when looking at the GitHub pages settings, the custom domain is removed, though the CNAME file is there.
- the first syncing worked, but only for the home page: all other links of the main navigation menu gave a 404 github page error.
- I reconnected the custom domain, copied the CNAME file again, and tried a second time, but this time did not work altogether.
Also, before copying the CNAME file, the website was displayed in plain html, completely ignoring any CSS, which instead was restored as soon as the custom domain is reconnected. I also noticed that some elements aren’t visualised properly, like the back-to-top button in the first picture (online home) instead of the back-to-top button in the second picture (local preview), where you can see the little arrow.
I’m not sure if I am doing something wrong
Thank you
Alex
November 14, 2023 at 11:17 am #11010[anonymous]… all other links of the main navigation menu gave a 404 github page error…
…plain html, completely ignoring any CSS…
This sound a lot like problem with the website-url and or the relative links setting.
November 14, 2023 at 12:06 pm #11011[anonymous]Yes, but it’s worth to clarify that it happened just when I sync the website through the Git sync, and all URLs are restored as I relink the custom domain to GitHub pages in the repository settings.
November 14, 2023 at 11:14 pm #11016[anonymous]@Alx – to be honest – I do not understand π Did you put CNAME file under root files in the Tools -> File Manager?
Then your custom domain should work without any issues. Previous configuration was working with Github Pages, because Github Pages could ignore some files – now Publii has full control over the repository content so if CNAME file not exists in your Publii files, then it will be removed/not synced
November 15, 2023 at 9:38 am #11023[anonymous]Hello Tomasz,
Tomasz Dziuda wrote:@Alx β to be honest β I do not understand π
Sorry if I haven’t explained myself, I’m puzzled about it too.
Tomasz Dziuda wrote:… Did you put CNAME file under root files in the Tools -> File Manager?
yes I did. I downloaded the CNAME file from the repo and uploaed in the root file manager in Publii, then I synced it again to see if it was working, but it worked only for the home page. I tried a second sync, and despite the CNAME file being there, when I tried to see the website, it gave me a 404 github error for the whole website.
For now, I deleted the CNAME file in the file manager and simply relinked on the GitHub pages settings; the website is working fine again (but with some rendering errors like the back to top button in the pictures I shared before)
I have some content updates to do today, so I can retry putting the current CNAME file in the file manager again and see what happens.
November 16, 2023 at 1:28 pm #11042[anonymous]Hello,
I downloaded and installed the new release, but the problem persists. I’m attaching some screenshots. Also the ‘test connection’ still remain stuck. I’m on Windows 11, version 23H2.
Thank you for your patience.
Alx
November 16, 2023 at 1:31 pm #11047[anonymous]@Alx – your issue is connected with fact that the file must be named CNAME not CNAME.txt – you are adding unnecessary *.txt extension what probably causes your issue
November 16, 2023 at 2:33 pm #11050[anonymous]Yes, I notice it now, though I think the .txt was automatically generated. Unfortunately, now that I’m trying to see if it work, it gives me a push error. I’ll try to reconfigure it, or I might just switch to Netlify.
November 16, 2023 at 2:53 pm #11052[anonymous]I just want to add that I tried to reconfigure the Git server, generated a new token, and
- test connection still stuck
- it says it syncs, but it actually doesn’t.
November 16, 2023 at 7:30 pm #11059[anonymous]@Alx – are you using v.0.44.1 or v.0.44.0?
did you renamed CNAME file under File Manager or in the output files?
November 16, 2023 at 7:44 pm #11061[anonymous]Hello Tomasz,
are you using v.0.44.1 or v.0.44.0?
v.0.44.1
did you renamed CNAME file under File Manager or in the output files?
I renamed the CNAME (removing the extension .txt) in the download folder when downloading it from GitHub.
But as I said, I don’t know if the CNAME file has any problem, because at the moment Publii is not updating (though it says it synced successfully, but nothing happens in GitHub).
I’m sorry for all those messages, and I really appreciate you coming back to me. I’m a bit puzzled.
November 16, 2023 at 9:04 pm #11063[anonymous]Please try to do as following:
1) Put CNAME file under My Documents/Publii/sites/YOUR_SITE_NAME/input/root-files/
2) Please remove totally folder My Documents/Publii/sites/YOUR_SITE_NAME/output
3) Please create empty folder “output”: My Documents/Publii/sites/YOUR_SITE_NAME/output
Then please try to resync your website
November 17, 2023 at 7:43 pm #11080[anonymous]Hello Tomasz,
thank you for being so helpful, unfortunately I think there is an issue with the sync.
I followed all your instructions, and synced again. The new “output” folder has been repopulated, and Publii seemed to run the sync successfully (no error message). But when I go to GitHub, no action is performed.
November 18, 2023 at 11:18 pm #11087[anonymous]@Alx – I suppose that you have some deeper issue with your permissions – do you have anything under Tools -> Log viewer -> deployment-process/deployment-errors?
November 20, 2023 at 4:29 pm #11104[anonymous]Hello Tomasz,
deployment-process.log:
a list of
Git debug: add =
for all pages/media/docs/files etc.
last lines:
Git debug: git add done Git debug: changes exists = false
deployment-errors.log
The log file is empty...
Thank you,
Alx
November 21, 2023 at 9:17 pm #11120[anonymous]Seems the files in root folder are taken as folders
Rendering process failed
An error occurred during rendering process:ENOTDIR: not a directory, open ‘/Users/lgirardi/Documents/Publii/sites/lab/preview/CNAME/index.html’
November 23, 2023 at 3:54 pm #11123[anonymous]Hello, Alx again.
As GitHub doesn’t update and I need to keep going in building this website, I decided to switch to Netlify. I connected the new site (without the custom domain for now as it was a trial) but when I sync the website, at the end of the upload process it says it can’t connect to the server.
Here what it says in the deployment-prcess.log
[Thu, 23 Nov 2023 14:43:34 GMT] Netlify ERROR: false
When I do the test connection with the server the result is successful.
I’m a bit puzzled at the moment, especially because I also bought a theme and plugins, and I really like Publii, so I am reluctant to switch to other CMS.
November 23, 2023 at 3:58 pm #11124[anonymous]Alx – I will analyse the issues with Git in nearest days. As a temporary solution you can use manual deployment and upload generated ZIP package to Netlify directly through their UI
November 23, 2023 at 4:08 pm #11125[anonymous]Hello Tomasz,
thank you for your swift reply.
As a trial, I decided to clone the website and try to redeploy with Git and the CNAME file in the root folder. It worked, updated, maintained the custom domain name.
I’ll keep the Neflify option as a backup plan for now, though.
Waiting for more updates, and thank you a lot for all the support.