blog/.gitea/workflows/main-build.yaml
Emin Arslan 65b649e635
Some checks failed
Build & Deploy / build-or-sth (push) Failing after 31s
Removed test workflow steps, and the test post
2024-11-16 16:00:18 +03:00

26 lines
882 B
YAML

name: Build & Deploy
on:
push:
branches:
- main
jobs:
build-or-sth:
runs-on: ubuntu-latest
steps:
- name: Clone repo
run: git clone --recurse-submodules https://git.emin.software/haxala1r/blog.git --depth=1 .
- name: Get hugo
run: |
wget https://github.com/gohugoio/hugo/releases/download/v0.131.0/hugo_extended_0.131.0_linux-amd64.tar.gz -O hugo.tar.gz
tar xzvf hugo.tar.gz
- name: Build
run: ./hugo
- name: Deploy
run: |
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id
chmod 600 /tmp/id
ssh-keyscan emin.software > ~/.ssh/known_hosts
scp -oUser=${{secrets.SSH_USER}} -i ~/.ssh/id -r public/* emin.software:${{secrets.WEB_PATH}}