The GitHub integration of Simply Static provides a lot of benefits compared to the classic ZIP and local directory exports:
- version control (no more backups)
- deployment on Github Pages, Cloudflare Pages, Vercel, Netlify, FTP, AWS and CDNs
- automatic push-to-deploy changes from WordPress to your static website
It’s also the recommended way to run Simply Static for a full-featured way of running a static version of your WordPress website.
Go to Simply Static->Settings->Github.
You should see a couple of fields that we will fill out step by step now.
Don’t worry when you have not worked with GitHub and version control before. Simply Static will handle pretty much everything for you. You just need an account and an access token to allow Simply Static to take action.
GitHub Account and Personal Access Token
Head over to https://github.com/join and create an account.
After that, we have to create a personal access token. You can find that in your account, click on your profile picture on the right corner of GitHub, it opens a submenu then choose “Settings”
Then click on “developer settings” on the left sidebar:
Then choose “Personal Access Token” and click on “Generate new token”:
Now we have to configure the scopes that the personal access zoken is allowed to use.
Simply Static need the privileges to read and write repositories, delete repositories, and the user settings (to verify actions). I would also recommend activating “Workflows” as this will be integrated into Simply Static in the future to further automate your deployment.
The full configuration should look like that:
Click “Generate token” and copy the generated code to add it to Simply Static.
Completing the configuration
Now we can head back to the Simply Static settings and finish up the configuration. Go to Simply Static -> Settings -> Github and add your user name and the personal access token.
Add a name for a repository. This does not need to be the name of your website, it can be pretty much everything. You can decide if your repository should be public or private. Public repositories can be seen by everyone, private repositories are limited to you and everyone you grant access to.
You can add a name for the branch, but you don’t have to – Simply Static uses main as the default one automatically. This setting can depend on your used deployment option.
When you are ready hit “Save Changes”.
Create a repository
Now you should see an additional button next to “Save changes” called “Add repository” – click on it. If your provided details are correct you will see a link next to “Link to your repository” otherwise you get an error message that provides you the solution to your problem.
That’s it. You have successfully connected Simply Static with GitHub. Make sure you have configured “Github” as your delivery method in Simply Static -> Settings -> General and the next time click “Generate” in Simply Static -> Generate it will commit your files directly to GitHub.
It also checks if there was a modification before updating a file to minimize the number of API requests done and speed up the generation.