So this is my source directory. Here, I have created a pages directory. And here I have a simple sample of a markdown file. And this is a config.yml, I’m using a team. And in the dot GitHub workflows, we have a YAML file, which will behave as a CI/CD pipeline for our job. So here, this is the basic name for our workflow. And this is a trigger that I have created, which means that on push on a branch, which is main, this job will be executed. So for this job, I’m using the runner Ubuntu. And we have sequential steps here. The first one is that it will check out the repository. So using GitHub actions, like in Jenkins, or get CircleCI, for Jenkins, we use plugins for CircleCI, we use orbs. So here in GitHub actions, we use different GitHub repositories, which actually holds a code for checking out and stuff like that. So first, we will use checkout to check out our code. And this is a name of a use case, which will send the static files to another repo. And for this, we are using this repository. So if I go to this repository, this is just a workflow, which will enable us to push the contents to a different repository. So it does support different properties here, like for this API token is required the source destination repo, some basic properties are required here. Okay, so for our static pages, that directory is pages, the username is actually GitHub actor. This is a result environment variable from GitHub, which is your username, and their destination repository is my username/repository. And this is the target repository, GitHub Pages target. And the destination branch is GitHub Pages, I have set up a different repository, and I’ve created a different branch for this purpose. Okay, so in the target repository. If we go to settings, and go to pages, you can see that GitHub Pages is already enabled and it is being hosted in this. So this is my username yasirtariq.github.io/repository name. So using the source here, we are using the root level, because we assume that all static contents will be in the root path, but we can also use a directory name, which for this purpose is only bound to use talks directly here. And we can go forward and choose themes of choice. You can also use custom domains here. Like if we don’t want to use our user name, or the repository name, we can use the custom domains here but this is not free and we have to subscribe to the GitHub plan for this. By default it is using HTTPS. Okay, so let’s make a small change in GitHub pages. So upon a change and if you go to the actions you can see that one workflow is set to cue and if we open this the build is about to trigger.
So first, it has set up the environment for this virtual environment and all the necessary stuff. And then it has copied the files to a different repository and then eventually it has completed the job. And you see here the status indicates that the build has been completed. And if we go to our target was three and hit this. You see, my changes are immediately reflected here. So here you can, I’m using a sample markdown, but you can use your own HTML content, as well. Here. So this is about this demo. If you have any questions, please let me know. Thank you.