mixtape/.gitea/workflows/build.yaml

37 lines
838 B
YAML
Raw Normal View History

2024-01-08 09:14:17 +01:00
name: Build
on:
push:
branches:
- master
env:
HOST: ${{ secrets.SSH_HOSTNAME }}
HOST_DIR: ${{ secrets.SSH_TARGET_DIR }}
SSH_USERNAME: ${{ secrets.SSH_USERNAME }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
jobs:
build:
runs-on: ubuntu-latest
2024-03-29 22:59:20 +01:00
container:
image: git.0x45.cz/em/mixtape:latest
2024-01-08 09:14:17 +01:00
steps:
- name: Checkout repository
2024-03-29 22:59:20 +01:00
run: git clone https://git.0x45.cz/em/mixtape.git /workspace/em/mixtape
2024-02-06 14:18:25 +01:00
- name: Build Chordpro
2024-01-08 09:14:17 +01:00
run: make
2024-02-06 14:18:25 +01:00
- name: Build Zola
2024-03-29 22:59:20 +01:00
run: zola build
2024-02-06 14:18:25 +01:00
2024-01-08 09:14:17 +01:00
- name: Deploy
run: |
eval "$(ssh-agent -s)"
ssh-add - <<< "${SSH_PRIVATE_KEY}"
mkdir -p ~/.ssh/
ssh-keyscan -H "${HOST}" >> ~/.ssh/known_hosts
2024-02-06 14:18:25 +01:00
rsync -ra --delete-after public/* "${SSH_USERNAME}@${HOST}:${HOST_DIR}"