Abstract
Generate Sitemap is an open-source Digital Marketing & SEO project. Generate an XML sitemap for a GitHub Pages site using GitHub Actions. The generate-sitemap GitHub action is designed to be used in combination with other GitHub Actions. For example, it does not commit and push the generated sitemap. It is built using Python, GitHub Actions. The complete source code is publicly available on GitHub under the MIT License, making it a useful reference for students building a Digital Marketing & SEO mini project or final-year project.
1. Introduction
The generate-sitemap GitHub action is designed to be used in combination with other GitHub Actions. For example, it does not commit and push the generated sitemap. See the Examples for examples of combining with other actions in your workflow.
The generate-sitemap action is for GitHub Pages sites, such that the repository contains the html, etc of the site itself, regardless of whether or not the html was generated by a static site generator or written by hand. For example, I use it for multiple Java project documentation sites, where most of the site is generated by javadoc. I also use it with my personal website, which is generated with a custom static site generator. As long as the repository for the GitHub Pages site contains the site as served (e.g., html files, pdf files, etc), the generate-sitemap action is applicable.
The generate-sitemap action is not for GitHub Pages Jekyll sites (unless you generate the site locally and push the html output instead of the markdown, but why would you do that?). In the case of a GitHub Pages Jekyll site, the repository contains markdown, and not the html that is generated from the markdown. The generate-sitemap action does not support that use-case. If you are looking to generate a sitemap for a Jekyll website, there is a Jekyll plugin for that.
2. Objective
Generate an XML sitemap for a GitHub Pages site using GitHub Actions
This project demonstrates how Python, GitHub Actions can be applied to a real-world Digital Marketing & SEO problem.
4. Technology Stack
- Python (implemented almost entirely in Python);
- The cicirello/pyaction Docker container, which
- git to use last commit dates for last modified dates in the sitemaps; and
- We started with our template repository for GitHub Actions implemented in
5. System Requirements
General requirements for this technology stack — check the README for exact versions.
- Python 3.8 or later
- pip / virtualenv for dependencies
- VS Code, PyCharm or Jupyter Notebook
- Git (to clone the repository)
6. Installation & Setup
git clone https://github.com/cicirello/generate-sitemap.git
cd generate-sitemapFull setup instructions are in the project README.
7. Future Enhancements
Suggested extensions you can add to make this your own project.
- Export reports to Google Sheets or PDF
- Schedule weekly automated reports
- Add competitor comparison
8. Viva / Review Questions
Common questions examiners ask for projects in this domain.
- Which marketing or SEO problem does this tool solve?
- Which data sources or APIs does it use (Search Console, Analytics, social platforms)?
- Which metrics or KPIs does it report and how are they calculated?
- How could the output help a business make decisions?
- How would you schedule it to run automatically?
9. Source Code & License
This project is developed by cicirello and published on GitHub under the MIT License. Please follow the license terms and credit the original author when you use or modify this code.
Want to build this as your internship project?
Work on a Digital Marketing & SEO project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode — online or offline.
Apply for Digital Marketing & SEO Internship