<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sarah Frisk on Medium]]></title>
        <description><![CDATA[Stories by Sarah Frisk on Medium]]></description>
        <link>https://medium.com/@sarahfrisk?source=rss-d79dd8062098------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*pKC8AmcAgmjp6N9QnDFIwQ.jpeg</url>
            <title>Stories by Sarah Frisk on Medium</title>
            <link>https://medium.com/@sarahfrisk?source=rss-d79dd8062098------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 04:56:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sarahfrisk/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to schedule your static site deploys with Netlify and Gitlab]]></title>
            <link>https://medium.com/@sarahfrisk/how-to-schedule-your-static-site-deploys-with-netlify-and-gitlab-3563bd7f4320?source=rss-d79dd8062098------2</link>
            <guid isPermaLink="false">https://medium.com/p/3563bd7f4320</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[static-site]]></category>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[netlify]]></category>
            <category><![CDATA[deployment]]></category>
            <dc:creator><![CDATA[Sarah Frisk]]></dc:creator>
            <pubDate>Fri, 31 Jan 2020 21:29:49 GMT</pubDate>
            <atom:updated>2020-01-31T21:29:49.053Z</atom:updated>
            <content:encoded><![CDATA[<p>Last year I decided that my goal was going to be to relaunch my comic, <a href="https://tavern-wenches.com/">Tavern Wenches</a>, at the beginning of 2020. Unfortunately, I’m the type of person who will tell myself “Hey, since I’ve decided to tackle this big project of relaunching a comic, why not double my workload and build a new site from scratch while I’m at it? After all, you want to make a comic that was responsive and accessible, don’t you?” (My inner product owner LOVES scope creep). And so Operation Relaunch My Comic quickly increased in scope and the next few months were a mix of writing, art, and coding depending on what I was in the mood for that day (or most stressed about).</p><p>After playing with a few different ideas for a tech stack, I decided on making the comic website using <a href="https://gohugo.io/">Hugo</a> and <a href="https://www.netlifycms.org/">NetlifyCMS</a> (something I’ll write about more in the future). I host the comic on <a href="https://www.netlify.com/">Netlify</a> with the code in a private repo on <a href="https://gitlab.com/">GitLab</a>. For the first three weeks, I manually deployed my site on Monday at midnight, launching the new page of my comic to the world.</p><p>However it should be noted that I am a lazy individual, even if I do have a tendency of getting a bit extra in my side projects. I quickly decided manually deploying my site every Monday at midnight was a waste of time. I had so many other things I could be doing. Like sleeping! Or binging Youtube! Or working on next week’s comic! Or rolling up a new D&amp;D character!</p><p>So during a lunch break while enjoying leftover tacos (the lunch of champions), I set up an automated scheduled deployment for my site using Netlify and GitLab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WYCULi8PIzTt3-lgUsoqBg.jpeg" /><figcaption>GitLab + Netlify = 😍</figcaption></figure><p>For the purposes of this tutorial, I’m going to assume you already have a site hosted on <strong>Netlify</strong>, and the code for it is on <strong>GitLab</strong>.</p><p>First off, you’re going to log into your <strong>Netlify</strong> account, select the <strong>Site</strong> you want to schedule deploys for, and then go to <strong>Settings &gt; Build &amp; Deploy &gt; Continuous Deployment</strong> and then scroll down to <strong>Build hooks</strong>.</p><p>It should look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*qFosgjlk3PoTizZE8jTWFw.png" /><figcaption>Empty Build Hooks List in Netlify Site Settings</figcaption></figure><p>Click on the <strong>Add build hook </strong>button, which should open a form asking for a <strong>Build hook name</strong> and a <strong>Branch to build</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*_PVzTWEvTs5vkGutL8p4XA.png" /><figcaption>Build Hooks Form in Netlify Site Settings</figcaption></figure><p>For <strong>Build hook name</strong>, call it whatever you want. I called mine “Midnight Deploy” because sometimes I’m lacking in originality on my build hook names. Click on <strong>Save</strong> and you’ll be able to see your build hook address all ready to go:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*qg4IbTtfVqDhEMEUaAPtwQ.png" /><figcaption>Build Hooks List in Netlify Site Settings</figcaption></figure><p>Copy the url listed next to your build hook name. Next you’re going to go to your project on your local computer, and create (if there isn’t one already) a file called <em>.gitlab-ci.yml</em> in the root of your project. In the file add the following (with the url updated to be the one you got from <strong>Netlify</strong>):</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/67f3837ea90f934cec7d608b2037f1e5/href">https://medium.com/media/67f3837ea90f934cec7d608b2037f1e5/href</a></iframe><p>Basically what this does is when you have a scheduled job occur in <strong>GitLab</strong>, it will run that script that lets <strong>Netlify</strong> know you want to deploy your site. Commit that code and push it to <strong>GitLab</strong>.</p><p>Next you’re going to log into <strong>GitLab</strong> in your browser, navigate to your project, then go to <strong>CI /CD &gt; Schedules </strong>from the left sidebar menu.<strong> </strong>That page should look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_nW90XSxE-ZbkVB0bkMe_w.png" /><figcaption>Empty view of the Schedules table in GitLab</figcaption></figure><p>Click on the <strong>New schedule</strong> button, which should open up the <strong>Schedule a new pipeline</strong> form</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*ZUcNJ5AEb6wVzwF7Fdwjsw.png" /><figcaption>Empty version of the Schedule a new pipeline form on GitLab</figcaption></figure><p>Describe your new pipeline with something memorable (I went with “Midnight Deploy Party” because I had finished my tacos at this point and felt like partying). There are some options listed for how often you want to have this pipeline to occur, and I decided to have this job run every night at midnight so I selected the <strong>Custom</strong> option with the pattern “0 0 * * *”. Select a time zone if you so choose, but otherwise you can keep everything at the default settings. Your form will look something like this when you’re done:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*9Iv4fS0y5eZnPzgeppz-xQ.png" /><figcaption>Filled out form for Schedule a new pipline in Gitlab</figcaption></figure><p>After that, click on the <strong>Save pipleine schedule</strong>, and that will take you back to the <strong>Schedules </strong>list with your new pipleline listed. To test if the scheduled pipeline will trigger a deploy, click on the <strong>Play</strong> button, on the right hand side of that row in the table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P4p64O4BrQnslzdNjxZsKw.png" /><figcaption>Schedules List in GitLab</figcaption></figure><p>You should get a notification that says something like “Successfully scheduled a pipeline to run. Go to the Pipelines page for details.” You can go to the Pipelines page if you want (that just lets you know if the script is still running), but to really test if this worked, go to <strong>Netlify</strong> and open up the <strong>Deploy</strong> tab on your site’s website. If everything is set up correctly, you should see a notification that your site is being built, having been triggered by your build hook:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ST_84vpqcQcGC5BsOR118A.png" /><figcaption>Production Deploy History on Netlify</figcaption></figure><p>Once that is published, your updated site should be available to the world!</p><p>As a final confirmation, make sure to check back after whenever your actual scheduled deploy is supposed to occur, just to make sure the timing is set up correctly, but otherwise feel free to bask in the knowledge that you no longer need to manually deploy the new content for your website.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3563bd7f4320" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>