Tweaks to gitignore and deployment pipeline.

This commit is contained in:
2025-02-20 13:54:19 -05:00
parent 2d815c8527
commit be112d7d5b
2 changed files with 53 additions and 23 deletions
+30 -13
View File
@@ -1,24 +1,41 @@
name: Hugo site deploy & publish
name: Deploy Hugo Site
on:
push:
branches:
- main
jobs:
deploy-website:
deploy-hugo-site:
name: Build and Deploy to Server
runs-on: ubuntu-latest
steps:
- name: Do a git checkout including submodules
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
submodules: true
- name: Generate and deploy website
uses: ronvanderheijden/hugo-rsync-deployment@master
env:
VPS_DEPLOY_KEY: ${{ secrets.HUGO_DEPLOY_PRIVATE_KEY }}
VPS_DEPLOY_USER: ${{ secrets.HUGO_DEPLOY_USERNAME }}
VPS_DEPLOY_HOST: 192.168.1.254
VPS_DEPLOY_DEST: ${{ secrets.HUGO_SITE_LOCATION }}
hugo-version: "latest"
extended: true
- name: Build Hugo Site
run: hugo --minify
- name: Deploy to Server via SSH
uses: appleboy/scp-action@v0.1.7
with:
hugo-arguments: '--source=. --configDir=config/ -e production'
rsync-arguments: '--archive --compress --xattrs --dry-run'
host: ${{ secrets.HUGO_SITE_HOST }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
source: "public/"
target: "${{ secrets.HUGO_SITE_LOCATION }}/"
- name: Restart Hugo Container (Optional)
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.HUGO_SITE_HOST }}
username: ${{ secrets.HUGO_DEPLOY_USERNAME }}
key: ${{ secrets.HUGO_DEPLOY_PRIVATE_KEY }}
script: |
docker restart hugo
+23 -10
View File
@@ -1,15 +1,28 @@
# ---> Hugo
# Generated files by hugo
# Hugo build output
/public/
/resources/_gen/
/assets/jsconfig.json
hugo_stats.json
/resources/
# Executable may be added to repository
# Hugo cache and lock files
.hugo_build.lock
.hugo_build.cache/
# OS-generated files
.DS_Store
Thumbs.db
# Editor/IDE files
.vscode/
.idea/
*.iml
# Temporary files
*.tmp
*.log
*.swp
*.swo
*.bak
# Hugo executable binaries (if manually downloaded)
hugo.exe
hugo.darwin
hugo.linux
# Temporary lock file while building
/.hugo_build.lock