Skip to content

Commit

Permalink
Merge (#7)
Browse files Browse the repository at this point in the history
* Bump theme to v1.5.1

* update documentation

* update documentation

* Merge pull request #4 from MozeBaltyk/gh-pages (#5)

* update k8s doc

* update hugo in gh-pages

* update actions versions in CICD
  • Loading branch information
MozeBaltyk committed Jan 13, 2024
1 parent 7a85695 commit 48d2ee5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ on:
workflow_dispatch:
push:
branches: ["main"]
pull_request:
#pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
# branches: [ "main" ]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
Expand Down Expand Up @@ -39,17 +39,17 @@ jobs:
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Checkout 🛎️
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '16'

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -67,7 +67,7 @@ jobs:

- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v4

- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
Expand All @@ -83,7 +83,7 @@ jobs:
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: ./public

Expand All @@ -97,4 +97,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages 🚀
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
4 changes: 3 additions & 1 deletion content/news/how-to-create-this-blog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,9 @@ Taxonomies are classifications of logical relationships between content. Underst

To deploy the blog, I simply use Github Wokflow which build and publish it with Github Pages. Here, you can adopt several strategy for your own deployment.

I started with everytime that I was pushing the code, it deploy. It gave me no time after saving to read again my articles. Then I put it on `workflow_dispatch`, so I manually trigger the workflow to publish it. But the proper way to do, I just push on branch call `gh-pages` then merge it with the main so it trigger the publication only when it arrive on the main branch.
I started with everytime that I was pushing the code, it deploy. It gave me no time after saving to read again my articles. Then I put it on `workflow_dispatch`, so I manually trigger the workflow to publish it. But the proper way to do, I just push on branch `gh-pages` which is set as the default then merge it with the main so it trigger the publication only when it arrive on the main branch.

In the settings for branch protection, an option "Require a pull request before merging" prevent to directly commit on `main`.

I will not put all the workflow code, his you can get it [here](https://github.com/MozeBaltyk/mozebaltyk.github.io/tree/main/.github/workflows).

Expand Down

0 comments on commit 48d2ee5

Please sign in to comment.