Try out Gitea Actions ...
This commit is contained in:
-42
@@ -1,42 +0,0 @@
|
|||||||
kind: pipeline
|
|
||||||
name: default
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: clone
|
|
||||||
image: alpine/git
|
|
||||||
commands:
|
|
||||||
- git lfs install
|
|
||||||
- git clone http://gitea:3000/${CI_REPO_NAME} .
|
|
||||||
- git checkout ${CI_COMMIT_SHA}
|
|
||||||
- name: hugo
|
|
||||||
image: git.ipng.ch/ipng/drone-hugo:release-0.161.1
|
|
||||||
settings:
|
|
||||||
hugo_version: 0.161.1
|
|
||||||
extended: true
|
|
||||||
- name: rsync
|
|
||||||
image: drillster/drone-rsync
|
|
||||||
settings:
|
|
||||||
user: drone
|
|
||||||
key:
|
|
||||||
from_secret: drone_sshkey
|
|
||||||
hosts:
|
|
||||||
- nginx0.chrma0.net.ipng.ch
|
|
||||||
- nginx0.chplo0.net.ipng.ch
|
|
||||||
- nginx0.chlzn0.net.ipng.ch
|
|
||||||
- nginx0.frggh0.net.ipng.ch
|
|
||||||
- nginx0.nlams0.net.ipng.ch
|
|
||||||
- nginx0.nlams1.net.ipng.ch
|
|
||||||
- nginx0.nlams2.net.ipng.ch
|
|
||||||
port: 22
|
|
||||||
args: '-6'
|
|
||||||
source: public/
|
|
||||||
target: /nginx/sites/sabbatical.ipng.nl/
|
|
||||||
delete: true
|
|
||||||
recursive: true
|
|
||||||
secrets: [ drone_sshkey ]
|
|
||||||
|
|
||||||
image_pull_secrets:
|
|
||||||
- git_ipng_ch_docker
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
name: Build and Deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: hugomods/hugo:exts-0.161.1
|
||||||
|
steps:
|
||||||
|
- name: Checkout with LFS
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
lfs: true
|
||||||
|
|
||||||
|
- name: Build Hugo site
|
||||||
|
run: hugo --minify
|
||||||
|
|
||||||
|
- name: Deploy via rsync
|
||||||
|
env:
|
||||||
|
SSH_KEY: ${{ secrets.drone_sshkey }}
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
echo "$SSH_KEY" > ~/.ssh/id_ed25519
|
||||||
|
chmod 600 ~/.ssh/id_ed25519
|
||||||
|
for host in \
|
||||||
|
nginx0.chrma0.net.ipng.ch \
|
||||||
|
nginx0.chplo0.net.ipng.ch \
|
||||||
|
nginx0.chlzn0.net.ipng.ch \
|
||||||
|
nginx0.frggh0.net.ipng.ch \
|
||||||
|
nginx0.nlams0.net.ipng.ch \
|
||||||
|
nginx0.nlams1.net.ipng.ch \
|
||||||
|
nginx0.nlams2.net.ipng.ch; do
|
||||||
|
rsync -av --delete \
|
||||||
|
-e "ssh -i ~/.ssh/id_ed25519 -p 22 -6 -o StrictHostKeyChecking=no" \
|
||||||
|
public/ drone@${host}:/nginx/sites/sabbatical.ipng.nl/
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user