Tweaks to gitignore and deployment pipeline.
This commit is contained in:
@@ -1,24 +1,41 @@
|
|||||||
name: Hugo site deploy & publish
|
name: Deploy Hugo Site
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy-website:
|
deploy-hugo-site:
|
||||||
|
name: Build and Deploy to Server
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Do a git checkout including submodules
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Hugo
|
||||||
|
uses: peaceiris/actions-hugo@v3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
hugo-version: "latest"
|
||||||
- name: Generate and deploy website
|
extended: true
|
||||||
uses: ronvanderheijden/hugo-rsync-deployment@master
|
|
||||||
env:
|
- name: Build Hugo Site
|
||||||
VPS_DEPLOY_KEY: ${{ secrets.HUGO_DEPLOY_PRIVATE_KEY }}
|
run: hugo --minify
|
||||||
VPS_DEPLOY_USER: ${{ secrets.HUGO_DEPLOY_USERNAME }}
|
|
||||||
VPS_DEPLOY_HOST: 192.168.1.254
|
- name: Deploy to Server via SSH
|
||||||
VPS_DEPLOY_DEST: ${{ secrets.HUGO_SITE_LOCATION }}
|
uses: appleboy/scp-action@v0.1.7
|
||||||
with:
|
with:
|
||||||
hugo-arguments: '--source=. --configDir=config/ -e production'
|
host: ${{ secrets.HUGO_SITE_HOST }}
|
||||||
rsync-arguments: '--archive --compress --xattrs --dry-run'
|
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
@@ -1,15 +1,28 @@
|
|||||||
# ---> Hugo
|
# Hugo build output
|
||||||
# Generated files by hugo
|
|
||||||
/public/
|
/public/
|
||||||
/resources/_gen/
|
/resources/
|
||||||
/assets/jsconfig.json
|
|
||||||
hugo_stats.json
|
|
||||||
|
|
||||||
# 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.exe
|
||||||
hugo.darwin
|
hugo.darwin
|
||||||
hugo.linux
|
hugo.linux
|
||||||
|
|
||||||
# Temporary lock file while building
|
|
||||||
/.hugo_build.lock
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user