Deployment on Github page
The easiest way is to deploy it on Github directly. Your website address will be https://GITHUB_USERNAME.github.io
. You can find more details here: https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-github-pages-site.
Deploy the website on Cloudflare page
The website is stored on Github and deployed on Cloudflare Page. You can use following steps to deploy it.
- Create a Github repository (can be private or public), and then push all the content in
internal_website
to this repository. - Go to your Cloudflare portal: in Workers & Pages | Overview | Create application | Pages | Connect to Git. Then select your Github repository.
- Then you can add it to a domain name and wait it to be deployed.
Add Access control using Cloudflare Zero Trust
If you deploy your webpage on Cloudflare, you can add access control so that only certain people can access your website. For this website, I use Cloudflare Zero Trust for access control. Go to your Cloudflare portal, click Websites | YOURWEBSITES | Access | Launch Zero Trust
for your Zero Trust portal.
Add authentication method
I use Github OAuth App for authentication, so that I can allow people in a certain Github organization to have acecss to this website. To create a Github OAuth App, go to your Zero Trust portal, then click Settings | Authentication | Login methods | Add new
. Follow the instructions on the right and create a Github OAuth App under your Github account.
Create access group
In your Zero Trust portal, click Access | Access Groups | Add a Group
. Set your group name and define your grouop. I use Github Organization as Selector and I choose my Github organization and team to access this group.
Create access application
In your Zero Trust portal, click Access | Applications | Add an application | Overview
, set the application name as Intranet
, Session Duration, Application domain. Add Access policy: Under Access | Applications | Policies
, add a policy. Set your name, Action to Allow, and then select the access group you set above. In Authentication, choose Github as your authentication method.