Skip to content

Commit

Permalink
Automated build
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 15, 2024
1 parent 1770b89 commit 78f3ffd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion public/blog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@
<p>This website is built with the <a href="https://gohugo.io/">HUGO</a> static website generator using the <a href="https://github.com/lxndrblz/anatole">anatole</a> theme.<br>
The website&rsquo;s source code is hosted in <a href="https://github.com/Antiz96/antiz.fr/">this GitHub repository</a>.</p>
<h2 id="automated-ci--cd-workflow">Automated CI / CD workflow</h2>
<p>Every changes I made (e.g. creating a new article, update the theme, add new parameters to the website, &hellip;) are done in my local git repository on the <a href="https://github.com/Antiz96/antiz.fr/tree/dev"><code>dev</code> branch</a>.<br>
<p>Every changes I make (e.g. creating a new article, update the theme, add new parameters to the website, &hellip;) are done in my local git repository on the <a href="https://github.com/Antiz96/antiz.fr/tree/dev"><code>dev</code> branch</a>.<br>
Once the changes are pushed to GitHub, I create a pull request from the <code>dev</code> branch to the main branch, which triggers CI / CD pipelines (running on my own self-hosted runners):</p></p>
<p>[...]</p>
<a class="custom-readmore" href="/blog/website-workflow/" title="The automated workflow I use to manage this website">Read More</a>
Expand Down
2 changes: 1 addition & 1 deletion public/blog/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ After a quick thought, I understood that a power outage occurred during the nigh
&lt;p&gt;This website is built with the &lt;a href=&#34;https://gohugo.io/&#34;&gt;HUGO&lt;/a&gt; static website generator using the &lt;a href=&#34;https://github.com/lxndrblz/anatole&#34;&gt;anatole&lt;/a&gt; theme.&lt;br&gt;
The website&amp;rsquo;s source code is hosted in &lt;a href=&#34;https://github.com/Antiz96/antiz.fr/&#34;&gt;this GitHub repository&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;automated-ci--cd-workflow&#34;&gt;Automated CI / CD workflow&lt;/h2&gt;
&lt;p&gt;Every changes I made (e.g. creating a new article, update the theme, add new parameters to the website, &amp;hellip;) are done in my local git repository on the &lt;a href=&#34;https://github.com/Antiz96/antiz.fr/tree/dev&#34;&gt;&lt;code&gt;dev&lt;/code&gt; branch&lt;/a&gt;.&lt;br&gt;
&lt;p&gt;Every changes I make (e.g. creating a new article, update the theme, add new parameters to the website, &amp;hellip;) are done in my local git repository on the &lt;a href=&#34;https://github.com/Antiz96/antiz.fr/tree/dev&#34;&gt;&lt;code&gt;dev&lt;/code&gt; branch&lt;/a&gt;.&lt;br&gt;
Once the changes are pushed to GitHub, I create a pull request from the &lt;code&gt;dev&lt;/code&gt; branch to the main branch, which triggers CI / CD pipelines (running on my own self-hosted runners):&lt;/p&gt;</description>

</item>
Expand Down
14 changes: 7 additions & 7 deletions public/blog/website-workflow/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
<meta name="twitter:title" content="The automated workflow I use to manage this website">
<meta name="twitter:description" content="The website This website is built with the HUGO static website generator using the anatole theme.
The website’s source code is hosted in this GitHub repository.
Automated CI / CD workflow Every changes I made (e.g. creating a new article, update the theme, add new parameters to the website, …) are done in my local git repository on the dev branch.
Automated CI / CD workflow Every changes I make (e.g. creating a new article, update the theme, add new parameters to the website, …) are done in my local git repository on the dev branch.
Once the changes are pushed to GitHub, I create a pull request from the dev branch to the main branch, which triggers CI / CD pipelines (running on my own self-hosted runners):">


Expand All @@ -140,7 +140,7 @@
<meta property="og:title" content="The automated workflow I use to manage this website">
<meta property="og:description" content="The website This website is built with the HUGO static website generator using the anatole theme.
The website’s source code is hosted in this GitHub repository.
Automated CI / CD workflow Every changes I made (e.g. creating a new article, update the theme, add new parameters to the website, …) are done in my local git repository on the dev branch.
Automated CI / CD workflow Every changes I make (e.g. creating a new article, update the theme, add new parameters to the website, …) are done in my local git repository on the dev branch.
Once the changes are pushed to GitHub, I create a pull request from the dev branch to the main branch, which triggers CI / CD pipelines (running on my own self-hosted runners):">
<meta property="og:locale" content="en_us">
<meta property="og:type" content="article">
Expand All @@ -164,7 +164,7 @@
"alternativeHeadline": "",
"description": "
\u003ch2 id=\u0022the-website\u0022\u003eThe website\u003c\/h2\u003e\n\u003cp\u003eThis website is built with the \u003ca href=\u0022https:\/\/gohugo.io\/\u0022\u003eHUGO\u003c\/a\u003e static website generator using the \u003ca href=\u0022https:\/\/github.com\/lxndrblz\/anatole\u0022\u003eanatole\u003c\/a\u003e theme.\u003cbr\u003e\nThe website\u0026rsquo;s source code is hosted in \u003ca href=\u0022https:\/\/github.com\/Antiz96\/antiz.fr\/\u0022\u003ethis GitHub repository\u003c\/a\u003e.\u003c\/p\u003e\n\u003ch2 id=\u0022automated-ci--cd-workflow\u0022\u003eAutomated CI \/ CD workflow\u003c\/h2\u003e\n\u003cp\u003eEvery changes I made (e.g. creating a new article, update the theme, add new parameters to the website, \u0026hellip;) are done in my local git repository on the \u003ca href=\u0022https:\/\/github.com\/Antiz96\/antiz.fr\/tree\/dev\u0022\u003e\u003ccode\u003edev\u003c\/code\u003e branch\u003c\/a\u003e.\u003cbr\u003e\nOnce the changes are pushed to GitHub, I create a pull request from the \u003ccode\u003edev\u003c\/code\u003e branch to the main branch, which triggers CI \/ CD pipelines (running on my own self-hosted runners):\u003c\/p\u003e
\u003ch2 id=\u0022the-website\u0022\u003eThe website\u003c\/h2\u003e\n\u003cp\u003eThis website is built with the \u003ca href=\u0022https:\/\/gohugo.io\/\u0022\u003eHUGO\u003c\/a\u003e static website generator using the \u003ca href=\u0022https:\/\/github.com\/lxndrblz\/anatole\u0022\u003eanatole\u003c\/a\u003e theme.\u003cbr\u003e\nThe website\u0026rsquo;s source code is hosted in \u003ca href=\u0022https:\/\/github.com\/Antiz96\/antiz.fr\/\u0022\u003ethis GitHub repository\u003c\/a\u003e.\u003c\/p\u003e\n\u003ch2 id=\u0022automated-ci--cd-workflow\u0022\u003eAutomated CI \/ CD workflow\u003c\/h2\u003e\n\u003cp\u003eEvery changes I make (e.g. creating a new article, update the theme, add new parameters to the website, \u0026hellip;) are done in my local git repository on the \u003ca href=\u0022https:\/\/github.com\/Antiz96\/antiz.fr\/tree\/dev\u0022\u003e\u003ccode\u003edev\u003c\/code\u003e branch\u003c\/a\u003e.\u003cbr\u003e\nOnce the changes are pushed to GitHub, I create a pull request from the \u003ccode\u003edev\u003c\/code\u003e branch to the main branch, which triggers CI \/ CD pipelines (running on my own self-hosted runners):\u003c\/p\u003e
Expand Down Expand Up @@ -214,7 +214,7 @@

,
"url" : "https:\/\/antiz.fr\/blog\/website-workflow\/",
"wordCount" : "394",
"wordCount" : "389",
"genre" : [ ],
"keywords" : [ ]
}
Expand Down Expand Up @@ -441,7 +441,7 @@ <h2 id="the-website">The website</h2>
<p>This website is built with the <a href="https://gohugo.io/">HUGO</a> static website generator using the <a href="https://github.com/lxndrblz/anatole">anatole</a> theme.<br>
The website&rsquo;s source code is hosted in <a href="https://github.com/Antiz96/antiz.fr/">this GitHub repository</a>.</p>
<h2 id="automated-ci--cd-workflow">Automated CI / CD workflow</h2>
<p>Every changes I made (e.g. creating a new article, update the theme, add new parameters to the website, &hellip;) are done in my local git repository on the <a href="https://github.com/Antiz96/antiz.fr/tree/dev"><code>dev</code> branch</a>.<br>
<p>Every changes I make (e.g. creating a new article, update the theme, add new parameters to the website, &hellip;) are done in my local git repository on the <a href="https://github.com/Antiz96/antiz.fr/tree/dev"><code>dev</code> branch</a>.<br>
Once the changes are pushed to GitHub, I create a pull request from the <code>dev</code> branch to the main branch, which triggers CI / CD pipelines (running on my own self-hosted runners):</p>
<p><img src="../../images/website-workflow/CI_CD_Jobs.png" alt="alt_text" title="Website Workflow - CI_CD Jobs"></p>
<h3 id="ci">CI</h3>
Expand All @@ -464,8 +464,8 @@ <h3 id="cd">CD</h3>
<p>It allows to automatically deploy the website by remotely triggering the dedicated related job on my <a href="https://www.jenkins.io/">Jenkins</a> server. This Jenkins job can either target my <code>dev</code> or <code>prod</code> environment for the deployment (the former being hosted on a virtual server in my homelab, the latter being hosted on a VPS), thanks to a dedicated parameter.</p>
<p><img src="../../images/website-workflow/Jenkins_Job_Parameters.png" alt="alt_text" title="Website Workflow - Jenkins Job Parameters"></p>
<p>Under the hood, this Jenkins job runs a simple <a href="https://www.ansible.com/">Ansible</a> playbook (see that playbook <a href="https://github.com/Antiz96/Linux-Server/blob/main/Ansible-Playbooks/roles/update_antiz.fr/tasks/main.yml">here</a>) that aims to update the website&rsquo;s sources on the targeted environment against the related GitHub branch (<code>dev</code> branch &ndash;&gt; development environment, <code>main</code> branch &ndash;&gt; production environment).</p>
<p>When opening a pull request from the <code>dev</code> branch to the <code>main</code> branch, the &ldquo;Deploy&rdquo; stage of my GitHub CD pipeline automatically triggers the related Jenkins job (which itself triggers the related Ansible playbook) targeting my <code>dev</code> environment, so my changes gets automatically deployed and I can review them on my development environment.</p>
<p>Once I reviewed the changes on my development environment and they are ready to go to production, I can just merge the pull request to the <code>main</code> branch which will <a href="https://github.com/Antiz96/antiz.fr/blob/main/.github/workflows/CD.yml#L4-L6">trigger a new run of the CD pipeline</a> with the &ldquo;Deploy&rdquo; stage targeting the <code>prod</code> environment this time!</p>
<p>When opening a pull request from the <code>dev</code> branch to the <code>main</code> branch on the GitHub side, the &ldquo;Deploy&rdquo; stage of the &ldquo;CD&rdquo; pipeline remotely triggers the Jenkins job targeting the <code>dev</code> environment. My changes are thus automatically deployed and I can review them on my development environment.</p>
<p>Once I reviewed the changes on my development environment and they are ready to go to production, I can just merge the pull request to the <code>main</code> branch which will <a href="https://github.com/Antiz96/antiz.fr/blob/main/.github/workflows/CD.yml#L4-L6">trigger a new run of the &ldquo;CD&rdquo; pipeline</a> with the &ldquo;Deploy&rdquo; stage targeting the <code>prod</code> environment this time!</p>
<p>This workflow may evolve and be improved over time but it&rsquo;s a good example of a simple; yet effective, flexible and reliable automated CI / CD workflow you can use to manage your projects! &#x1f604;</p>
</div>
<div class="post__footer">
Expand Down
2 changes: 1 addition & 1 deletion public/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ After a quick thought, I understood that a power outage occurred during the nigh
&lt;p&gt;This website is built with the &lt;a href=&#34;https://gohugo.io/&#34;&gt;HUGO&lt;/a&gt; static website generator using the &lt;a href=&#34;https://github.com/lxndrblz/anatole&#34;&gt;anatole&lt;/a&gt; theme.&lt;br&gt;
The website&amp;rsquo;s source code is hosted in &lt;a href=&#34;https://github.com/Antiz96/antiz.fr/&#34;&gt;this GitHub repository&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;automated-ci--cd-workflow&#34;&gt;Automated CI / CD workflow&lt;/h2&gt;
&lt;p&gt;Every changes I made (e.g. creating a new article, update the theme, add new parameters to the website, &amp;hellip;) are done in my local git repository on the &lt;a href=&#34;https://github.com/Antiz96/antiz.fr/tree/dev&#34;&gt;&lt;code&gt;dev&lt;/code&gt; branch&lt;/a&gt;.&lt;br&gt;
&lt;p&gt;Every changes I make (e.g. creating a new article, update the theme, add new parameters to the website, &amp;hellip;) are done in my local git repository on the &lt;a href=&#34;https://github.com/Antiz96/antiz.fr/tree/dev&#34;&gt;&lt;code&gt;dev&lt;/code&gt; branch&lt;/a&gt;.&lt;br&gt;
Once the changes are pushed to GitHub, I create a pull request from the &lt;code&gt;dev&lt;/code&gt; branch to the main branch, which triggers CI / CD pipelines (running on my own self-hosted runners):&lt;/p&gt;</description>

</item>
Expand Down

0 comments on commit 78f3ffd

Please sign in to comment.