Deployment
Version: Latest • 1 March 2025Deploy static sites to JAMstack platforms.
JAMstack
JAMstack is an architectural approach to web development whereby as much HTML as possible is pre-built and served by a Content Delivery Network (CDN), and dynamic components are powered by APIs. The JAM acronym stands for JavaScript, APIs and Markup. JAMstack websites and web applications are constructed using only these three elements - the markup (i.e. the HTML and CSS) defines what the user sees, JavaScript delivers any dynamic functionality, and APIs provide the ability to integrate with other first and third-party software services.
Static Webpages
An entirely static website is made up of one or more static webpages. Static webpages are HTML files which are pre-built, making them extremely quick to load. Static webpages deliver exactly the same content to all users each time they load.
Dynamic Webpages
Dynamic webpages are webpages that may be different each time they load. They are often used to deliver personalised content to the user. A traditional approach to generating dynamic webpages is to run a monolithic backend application, such as WordPress, on a server. Each time a user loads a dynamic webpage, this backend application running on a server must execute code which typically, but not always, involves querying a backend database based on a user or system-generated query. The results of running the code are then used to construct the HTML which is then returned to the user device. The dependence on provisioning a web server, installing and managing a monolithic backend application, and then running code in the backend to generate HTML for each request can significantly slow down webpage load times, and detrimentally impact the user experience.
JAMstack Websites
A mostly static JAMstack website is one that is predominantly made up of pre-built HTML files. However they can provide dynamic, personalised content by occasionally generating new static content or calling APIs, using JavaScript, to integrate with other software services and technology providers. It is the APIs therefore that enable the backend functions instead of a monolithic backend application such as WordPress. Consequently, JAMstack websites and web applications generally deliver:
- Better performance - as most content is made up of static HTML files along with static assets such as CSS, JavaScript and media files, they can be served by a Content Delivery Network (CDN) which is the fastest way to deliver web content to end users.
- Better scalability - API-powered backend functions can be easily scaled to seamlessly handle significant increases in usage.
- Better developer and user experience - as backend functions are enabled by APIs, developers of JAMstack websites can spend more time focusing on improving the frontend user experience.
JAMstack Platforms
Teddy is a static site generator (SSG) and is typically used to build either entirely or mostly static websites. As such, static sites built by Teddy are perfectly suited for deployment to JAMstack platforms such as Cloudflare Pages. Furthermore, JAMstack platforms often provide generous free plans including free utilisation of their Content Delivery Network (CDN), free SSL/TLS certificates, DDoS protection, basic traffic and performance insights and automated deployment pipelines, meaning that for most small and medium-sized static sites, zero web hosting costs are incurred other than the cost of purchasing and periodically renewing a domain name. On this page, you can find deployment instructions to selected JAMstack platforms where you can securely host your static sites entirely for free, and configure them to automatically update to reflect your latest reviewed and approved changes as part of a custom automated content management workflow.
Web Hosting
Alternatively, if you wish to use existing on-premises, private cloud, public cloud or shared web hosting infrastructure, for example web infrastructure provided by SiteGround, GoDaddy or similar shared web hosting services, to host your static site, then simply use a securely configured Secure File Transfer Protocol (SFTP) client, such as FileZilla, WinSCP or via the command line, to upload the built static site from $TEDDY_BASE/sites/{site.name}/public/{env}
to the public root of the target remote web server.