How to connect Static Hosting to Github

If you've subscribed to our Static Hosting but would like the freedom and flexibility to push code changes through GitHub, we offer the perfect solution with our Github Connect feature. We'll show you how to set that up!

1
Log in. You should arrive at the Domain Management screen. If you're already logged in, click on ACCOUNT in the top-right corner and select Domain Management.

2
Locate the domain with Static Hosting that you wish to connect to a GitHub repository. To the right of the domain, click on the Static Hosting icon under the "WEBSITE" column.

3
On the Static Hosting page, scroll all the way down to the section labeled "GitHub Connect". Click on the "connect" button.

4
You'll be redirected to a new page on GitHub (or prompted to log in to your GitHub account). Choose the option labeled "Only select repositories", and then in the dropdown menu select the GitHub repository that you're connecting to your domain.

After selecting your repository, click on "Install".

5
You'll be asked to confirm the access, either by verifying your password or entering a 2FA code. Enter the information GitHub is asking you for, then cick "Verify".

6
You will then be redirected back to the Static Hosting page on Porkbun. Scroll down to the "GitHub Connect" section again. Under the new "Repository" setting, click the dropdown menu and then select the repository you chose in the previous step.

7
You can then choose the branch that you're connecting to the hosting plan. This will typically be the "main" branch, unless you have multiple branches and there's a specific one you want to connect to the site.

That's it! You've successfully connected your GitHub repository to your domain and Static Hosting on Porkbun. Any changes you commit to the repository will automatically update and reflect on your live website. Feel free to get in touch with our support team if you run into any issues.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.