brainsteam.co.uk/.gitea/workflows/publish.yml

46 lines
1.4 KiB
YAML
Raw Normal View History

2023-06-10 21:33:06 +01:00
name: Deploy Website
2024-09-08 11:25:58 +01:00
on:
2023-07-09 08:54:51 +01:00
push:
branches:
- main
2023-06-10 21:33:06 +01:00
jobs:
build:
2024-09-08 11:35:58 +01:00
runs-on: ubuntu-latest
2023-06-10 21:33:06 +01:00
steps:
2024-09-08 11:25:58 +01:00
- name: check out repo
uses: actions/checkout@v4
2023-06-10 21:33:06 +01:00
2024-09-08 11:25:58 +01:00
# - name: install python+pip
2023-06-10 21:33:06 +01:00
# run: |
2024-09-08 11:25:58 +01:00
# apt-get update -y
# apt-get install -y python3 python3-pip
# - name: setup bstools
# run: pip install --index-url https://git.jamesravey.me/api/packages/ravenscroftj/pypi/simple/ bstools
- name: Deploy Site
run: |
mkdir -p ~/.ssh/
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
ssh \
-i ~/.ssh/id_rsa \
-t james@noprobe.rvns.xyz \
2024-09-08 11:46:09 +01:00
"cd /home/james/brainsteam.co.uk; git pull; cd brainsteam; ./build.sh"
2024-09-08 11:25:58 +01:00
shell: bash
env:
SSH_PRIVATE_KEY: ${{secrets.SSH_KEY}}
SSH_KNOWN_HOSTS: ${{secrets.SSH_KNOWN_HOSTS}}
# - name: Deploy Notes
# run: |
# mkdir -p ~/.ssh/
# echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
# chmod 600 ~/.ssh/id_rsa
# echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
# ssh -i ~/.ssh/id_rsa -t james@newprobe.jamesravey.me "cd /home/james/foam-mkdocs-publish; ./build.sh"
# shell: bash
# env:
# SSH_PRIVATE_KEY: ${{secrets.SSH_KEY}}
# SSH_KNOWN_HOSTS: ${{secrets.SSH_KNOWN_HOSTS}}