This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: Deploy to Git-Pages
|
name: Deploy to Caddy
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@@ -7,24 +7,23 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# This block tells the runner to mount the host volume into the build container
|
||||||
|
container:
|
||||||
|
image: hugomods/hugo:latest
|
||||||
|
options: --user root -v /srv/caddy/sites:/deploy
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Setup Hugo
|
|
||||||
uses: peaceiris/actions-hugo@v3
|
|
||||||
with:
|
|
||||||
hugo-version: 'latest'
|
|
||||||
extended: true
|
|
||||||
|
|
||||||
- name: Build Hugo
|
- name: Build Hugo
|
||||||
run: hugo --minify
|
run: hugo --minify --destination public
|
||||||
|
|
||||||
- name: Deploy to Caddy
|
- name: Deploy to Caddy
|
||||||
run: |
|
run: |
|
||||||
# This creates /srv/caddy/sites/wiki on the host
|
# The container now sees the host's /srv/caddy/sites as /deploy
|
||||||
mkdir -p /deploy/wiki
|
mkdir -p /deploy/wiki
|
||||||
|
|
||||||
# Clean old files and move new ones
|
# Clean old files and move new ones
|
||||||
|
|||||||
Reference in New Issue
Block a user