This commit is contained in:
parent
77b83ebf75
commit
a5633fb9fa
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
public/
|
||||
resources/
|
||||
pages.git/
|
||||
|
20
.woodpecker.yml
Normal file
20
.woodpecker.yml
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
branches: main
|
||||
|
||||
clone:
|
||||
git:
|
||||
image: woodpeckerci/plugin-git
|
||||
settings:
|
||||
recursive: true
|
||||
|
||||
pipeline:
|
||||
build:
|
||||
image: registry.gitlab.com/pages/hugo/hugo_extended:latest
|
||||
commands:
|
||||
- hugo
|
||||
|
||||
publish:
|
||||
image: ubuntu-latest
|
||||
commands:
|
||||
- ./deploy.sh
|
||||
|
23
deploy.sh
Normal file
23
deploy.sh
Normal file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
REMOTE=$(git remote get-url origin)
|
||||
|
||||
rm -fr pages.git
|
||||
mkdir pages.git
|
||||
|
||||
( cd pages.git && git init -b pages )
|
||||
rsync -av public/* pages.git
|
||||
|
||||
cat << EOF > pages.git/.domains
|
||||
neilhanlon.me
|
||||
neilhanlon.com
|
||||
hanlon.ninja
|
||||
thepotato.tech
|
||||
EOF
|
||||
|
||||
cd pages.git
|
||||
|
||||
git add -A
|
||||
git commit -m "Deployment at $(date -u -Is)"
|
||||
git remote add origin $REMOTE
|
||||
git push -f origin pages
|
Loading…
Reference in New Issue
Block a user