blog/.gitea/workflows/main-build.yaml

29 lines
993 B
YAML
Raw Normal View History

2024-11-16 12:11:00 +00:00
name: Build & Deploy
on:
push:
branches:
- main
jobs:
build-or-sth:
runs-on: ubuntu-latest
steps:
- run: echo "hi!"
2024-11-16 12:19:27 +00:00
- 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
2024-11-16 12:36:59 +00:00
- run: tar xzvf hugo.tar.gz
- run: id
- run: ls -la ~/
2024-11-16 12:28:52 +00:00
- name: build
run: ./hugo
2024-11-16 12:49:34 +00:00
- name: deploy
run: |
echo "${{ secrets.SSH_KEY }}" > /tmp/id
chmod 600 /tmp/id
mkdir -p ~/.ssh/
ssh-keyscan emin.software > ~/.ssh/known_hosts
scp -oUser=${{secrets.SSH_USER}} -i /tmp/id -r public/* emin.software:/home/${{ secrets.SSH_USER }}/web/web/