Can a private github repo be synced with pythonaywhere - github

I want to sync a Django project with pythonanywhere. But the Django repo is private is it possible to do so. So, that the deployment is up to date with the repo.

Yes, it is possible. You could set ssh key-pair on your PythonAnywhere account and add it to your GitHub account. Then pull your code on the PythonAnywhere side and re-load your web app.
You could also automate the whole process. See the tutorial: https://blog.pythonanywhere.com/191/

Related

Automatic pushing to Dreamhost from Github via Workflows

Recently transitioned hosting my website to Dreamhost from Netlify in order to host a dynamic site. One thing I miss is the ability to automatically deploy from Github to the hosting service when changes are detected in my repo.
I've found tutorials for pushing to Github from my Dreamhost server, but not the other way around. I have multiple people working on this website, and my hope is to do this centrall via Github instead of manually pushing to both Github and the Dreamhost server thru the command line.
My assumption is that to ssh to Dreamhost I need a public key from my client to store on the Dreamhost server. I don't know if this is possible to generate a public key from Github (related to the workflow), but if it is how I would I do it? The other option is to store the ssh credentials with Github repo secrets to connect, but I feel this isn't best practice.
How would I go about pushing my Github repo to my Dreamhost server automatically after changes to main?
Two different gists suggest the same approach.
Create a bare repo on the DreamHost server
push to it
have a post-receive hook doing the git restore in the target folder (on the same server) where the actual site is deployed
See "How to Git Push to a Server Machine without having to ssh on to that machine every time?"
What remains for your GitHub Action is, as describe in Deploying to a server via SSH and Rsync in a Github Action, to use a dedicated SSH key, whose private key is registered in GitHub secrets.

is there a way to mirror digital oceans unto a new github repo without using the old github repo(if it exists)

a client of mine has deployed a project he was using GoDaddy then migrated to digital oceans, I want his Github repo but the one on go daddy is outdated and unusable, the DevOps that did the migrations is not responding, so I was thinking if there is a way to clone/mirror from a digital oceans droplet unto a new github repo
Perhap you could use hub.
If you can ssh into the droplet, you just need to cd into the repo, install hub on the droplet, change the origin url to the one you want, and then run hub create. Don't forget to add the droplet's public ssh key to your github to allow hub to access it.

Automatic deployment to Restcomm

I'm setting up a Restcomm instance and I would like to integrate it with Jenkins, so each time we have a PR in github in a specific branch, Jenkins will deploy the RVD App to the Restcomm instance.
I have access to the RVD Workspace from Jenkins, so I guess I could have something like:
Developer create/update her RVD app in local.
She copies the APP from her workspace to a github repo and creates the PR.
Jenkins updates the remote RVD workspace copying/updating the new files / app.
I guess this would be work but I don't like to copy files from one workspace to another one because of inconsistencies and so on.
I would prefer something like:
Developer updates the APP source in github and creates a PR.
Jenkins packages the app (zip?) and invokes a Restcomm API to deploy it / update it.
Is it possible? Any documentation about that API?
We have an open issue for that (providing an API) at https://github.com/RestComm/Restcomm-Connect/issues/947. Would you be interested in contributing to move it forward faster ?

Make private changes on Github repo before deploy?

On GitHub sadly, a private repo is for premium users, and i uploaded a repo, but it has lot of login third party, and i want to make those login information private, and i have a MongoHQ connection, and want to make the database private, to deploy it on CloudControl.
How CloudControl and Heroku work, is that by taking the file AFTER the clone on disk or the clone is only 'temporary' file, and they take the one hosted on Github?
There is no need to have any credentials in the repository. It's actually highly discouraged to do so. The recommended way is to have your code read the credentials from the environment.
Refer to the Add-on credential section in the documentation for more details: https://www.cloudcontrol.com/dev-center/Platform%20Documentation#add-on-credentials

Update my website from a github repository

I use a website for testing purposes. Part of what I test is a public repository on GitHub. What I would like to do is have my site periodically check the repository and pull any changes to a folder in my site.
I'm using a LAMP server, is there some php and a cronjob that I can use to check and get the files from the repository?
I would use the webhooks Github allows. See here for a simple PHP example that executes a auto-pull if the Github repository gets updated.