This commit is contained in:
parent
de20314019
commit
801a888e8b
1 changed files with 40 additions and 0 deletions
40
.forgejo/workflows/publish.yaml
Normal file
40
.forgejo/workflows/publish.yaml
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
name: publish
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_DEPLOY_PRIVATE_KEY }}
|
||||||
|
TZ: Europe/Berlin
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Hugo setup
|
||||||
|
uses: xmengnet/actions-hugo@v3
|
||||||
|
|
||||||
|
- name: build project
|
||||||
|
run: |
|
||||||
|
hugo build
|
||||||
|
|
||||||
|
- name: upload artifact
|
||||||
|
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
path: _site
|
||||||
|
|
||||||
|
- name: deploy
|
||||||
|
run: |
|
||||||
|
apt-get update && apt-get install -y rsync
|
||||||
|
eval $(ssh-agent -s)
|
||||||
|
echo "$SSH_PRIVATE_KEY" | ssh-add -
|
||||||
|
mkdir ~/.ssh
|
||||||
|
ssh-keyscan ifsr.de > ~/.ssh/known_hosts
|
||||||
|
rsync -rvh --progress --delete --chmod=ugo=rwX public/ ese-deploy@ifsr.de:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue