Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Sample workflow for building and deploying a Hugo site to GitHub Pages
name: Deploy Hugo site to Pages
name: Deploy Hugo site to Pages (v2)

on:
# Runs on pushes targeting the default branch
push:
branches:
- feature/auto-build
- master

# Allows you to run this workflow manually from the Actions tab
Expand Down Expand Up @@ -38,18 +39,31 @@ jobs:
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: Install Dart Sass
# run: sudo snap install dart-sass
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Checkout Theme
uses: actions/checkout@v4
with:
repository: bemnlam/blowfish-mod.git
ref: 'hugo-new-version'
path: themes/blowfish

# - name: Debug message
# run: |
# ls -al
# ls -al themes
## get steps.pages.outputs.base_url
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
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
Expand All @@ -61,14 +75,17 @@ jobs:
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/" \
--destination public
--contentDir ../content \
--themesDir ../themes \
--destination ../public
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: ./blog/public
path: ./public

# Deployment job
# Deployment job (master branch only)
deploy:
if: github.ref == 'refs/heads/master'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand All @@ -77,4 +94,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
drafts
public
blog/public
.archived
.themes

# General
.DS_Store
Expand Down Expand Up @@ -28,3 +31,7 @@ Icon
Network Trash Folder
Temporary Items
.apdisk

### keep
!content/.gitkeep
!themes/.gitkeep
7 changes: 0 additions & 7 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +0,0 @@
[submodule "blog/content"]
path = blog/content
url = https://github.com/bemnlam/blog_posts.git
[submodule "blog/themes/blowfish"]
path = blog/themes/blowfish
url = https://github.com/bemnlam/blowfish-mod.git
branch = main
13 changes: 13 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "dev",
"type": "node-terminal",
"request": "launch",
"command": "open http://localhost:1313",
"preLaunchTask": "Serve Drafts",
"postDebugTask": "Terminate All Tasks"
}
]
}
46 changes: 40 additions & 6 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,45 @@
"label": "Serve Drafts",
"type": "shell",
"command": "hugo",
"args": ["server", "-D"],
"args": [
"serve", "-D",
"--source", "blog",
"--contentDir", "../content",
"--themesDir", "../.themes",
"--destination", "../public"
],
"group": {
"kind": "build",
"isDefault": true
},
"isBackground": true,
"problemMatcher": {
"pattern": [
{
"regexp": ".",
"file": 1,
"location": 2,
"message": 0
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ".",
"endsPattern": "Web Server is available at .*"
}
},
"options": {
"cwd": "${workspaceFolder}/blog"
"cwd": "${workspaceFolder}"
}
},
{
"label": "Launch Mark Text",
"label": "Launch Obsidian",
"type": "shell",
"command": "open",
"args": [
"-a",
"\"Mark Text\"",
"${workspaceFolder}/blog/content/posts",
"\"Obsidian\"",
"${workspaceFolder}/content",
"&"
],
"group": {
Expand All @@ -31,7 +52,7 @@
},
"isBackground": true,
"options": {
"cwd": "${workspaceFolder}/blog"
"cwd": "${workspaceFolder}"
}
},
{
Expand Down Expand Up @@ -62,9 +83,22 @@
"options": {
"cwd": "${workspaceFolder}/blog"
}
},
{
"label": "Terminate All Tasks",
"command": "echo ${input:terminate}",
"type": "shell",
"problemMatcher": []
}

],
"inputs": [
{
"id": "terminate",
"type": "command",
"command": "workbench.action.tasks.terminate",
"args": "terminateAll"
},
{
"id": "postTitlePrompt",
"description": "Title of the new post",
Expand Down
Loading