[Change] to GitHub Pages

This commit is contained in:
2024-04-27 16:50:17 +07:00
parent d704728d5f
commit b302ecb5f8
4 changed files with 80 additions and 100 deletions
+78
View File
@@ -0,0 +1,78 @@
# Sample workflow for building and deploying a Hugo site to GitHub Pages
name: Deploy Hugo site to Pages
on:
# Runs on pushes targeting the default branch
push:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
# Default to bash
defaults:
run:
shell: bash
jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.124.0
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass
run: sudo snap install dart-sass
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
+1 -1
View File
@@ -1,3 +1,3 @@
# MiTi99
Source code of my blog at [https://miti99.dev]().
Source code of my blog.
+1 -1
View File
@@ -2,7 +2,7 @@ module:
imports:
- path: github.com/adityatelange/hugo-PaperMod
baseURL: "https://miti99.dev"
baseURL: "https://tiennm99.github.io"
title: miti99
paginate: 5
-98
View File
@@ -1,98 +0,0 @@
baseURL = "https://miti99.dev"
title = "miti99"
#theme = "hugo-coder"
languageCode = "en"
defaultContentLanguage = "en"
paginate = 20
pygmentsStyle = "bw"
pygmentsCodeFences = true
pygmentsCodeFencesGuessSyntax = true
enableEmoji = true
googleAnalytics = 183798571
[params.googleTagManager]
id = "GTM-WR9BX9K"
[params.applicationInsights]
connectionString = "InstrumentationKey=995c7eeb-e39f-4dbf-9d36-222d09fd97d8;IngestionEndpoint=https://eastus-8.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/"
[params]
author = "MiTi99"
info = ["Developer", "Wibu"]
description = "MiTi99's personal website"
keywords = "miti99,blog,developer,personal"
avatarURL = "img/avatar.jpg"
favicon_32 = "img/favicon.png"
#favicon_16 = "img/favicon_16.png"
touchIcon = "img/touchIcon.png"
dateFormat = "January 2, 2006"
since = 2020
maxSeeAlsoItems = 6
commit = "https://github.com/tiennm99/miti99/tree/"
rtl = false
math = true
katex = true
colorScheme = "auto"
hideColorSchemeToggle = false
customCSS = []
customSCSS = []
customJS = []
enableTwemoji = true
[params.utterances]
repo = "tiennm99/miti99"
issueTerm = "pathname"
label = ""
theme = "preferred-color-scheme"
[taxonomies]
category = "categories"
series = "series"
tag = "tags"
author = "authors"
[[params.social]]
name = "Github"
icon = "fa fa-2x fa-github"
url = "https://github.com/tiennm99/"
[[params.social]]
name = "Gitlab"
icon = "fa fa-2x fa-gitlab"
url = "https://gitlab.com/miti99/"
[[params.social]]
name = "Facebook"
icon = "fa fa-2x fa-facebook"
url = "https://facebook.com/miti99"
[[params.social]]
name = "RSS"
icon = "fa fa-2x fa-rss"
url = "index.xml"
rel = "alternate"
type = "application/rss+xml"
[[menu.main]]
name = "About"
weight = 2
url = "about/"
[[menu.main]]
name = "Contact"
weight = 3
url = "contact/"
[[menu.main]]
name = "CV"
weight = 4
url = "https://tiennm99.github.io"
[[menu.main]]
name = "Misc"
weight = 5
url = "misc/"
[[menu.main]]
name = "Posts"
weight = 1
url = "posts/"