Add Gitea Action workflow for auto-build and deploy
Build & Deploy / deploy (push) Failing after 1m20s
Build & Deploy / deploy (push) Failing after 1m20s
This commit is contained in:
@@ -0,0 +1,37 @@
|
|||||||
|
name: Build & Deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Setup Hugo
|
||||||
|
uses: peaceiris/actions-hugo@v3
|
||||||
|
with:
|
||||||
|
hugo-version: latest
|
||||||
|
extended: true
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: hugo --minify
|
||||||
|
|
||||||
|
- name: Build search index
|
||||||
|
run: |
|
||||||
|
curl -sL https://github.com/CloudCannon/pagefind/releases/latest/download/pagefind-x86_64-unknown-linux-musl.tar.gz | tar xz
|
||||||
|
./pagefind --site public
|
||||||
|
|
||||||
|
- name: Deploy via rsync
|
||||||
|
env:
|
||||||
|
SSH_KEY: ${{ secrets.SSH_KEY }}
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
echo "$SSH_KEY" > ~/.ssh/id_ed25519
|
||||||
|
chmod 600 ~/.ssh/id_ed25519
|
||||||
|
ssh-keyscan -H pyte.dev >> ~/.ssh/known_hosts
|
||||||
|
rsync -avz --delete -e "ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no" public/ demian@pyte.dev:/opt/docker/website/
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
public/
|
||||||
|
.hugo_build.lock
|
||||||
|
pagefind
|
||||||
Reference in New Issue
Block a user