mixtape/.gitea/workflows/build.yaml

37 lines
850 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:
2024-10-01 17:43:01 +02:00
image: git.0x45.cz/em/mixtape:240904
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-06-03 09:54:05 +02:00
run: make pdf html
2024-01-08 09:14:17 +01:00
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)"
2024-03-29 22:59:20 +01:00
echo "${SSH_PRIVATE_KEY}" | ssh-add -
2024-01-08 09:14:17 +01:00
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}"