Removed buildDrafts from hugo.toml, added deploy to drafts
GitHub Pages / deploy (push) Successful in 40s

This commit is contained in:
2026-07-03 19:12:31 -07:00
parent 7a19b5ed4e
commit 69f3432328
2 changed files with 54 additions and 1 deletions
+54
View File
@@ -0,0 +1,54 @@
name: GitHub Pages
on:
push:
branches:
- main # Set a branch to deploy
pull_request:
jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
extended: true
- name: Build
run: hugo -D --minify
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: 'placeholder'
- name: Adding Known Hosts
run: ssh-keyscan -H ${{ secrets.SSH_IP }} >> ~/.ssh/known_hosts
- name: Deploy to remote server
uses: easingthemes/ssh-deploy@v6
with:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: "-rlgoDzvc -i --delete"
SOURCE: "./public/"
REMOTE_HOST: ${{ secrets.SSH_IP }}
REMOTE_USER: ${{ secrets.SSH_USER }}
TARGET: "/var/www/blog-drafts"
SCRIPT_AFTER: |
chown -R caddy:caddy /var/www/blog-drafts
# - name: Deploy to remote server
# run: rsync -avz ./public/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_IP }}:/var/www/blog
# - name: Chmod files to Caddy user
# run: ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_IP }} "chown -R caddy:caddy /var/www/blog"
-1
View File
@@ -2,7 +2,6 @@ baseURL = 'https://blog.barkingdog.cloud'
defaultContentLanguage = 'en'
title = "Don't give huskies technology. They break things."
theme = 'PaperMod'
buildDrafts = true
[menus]
[[menus.main]]