Small changes, try automatic deploy
This commit is contained in:
parent
0cf9e20054
commit
648a83a282
10 changed files with 87 additions and 32 deletions
24
.forgejo/workflows/deploy.yml
Normal file
24
.forgejo/workflows/deploy.yml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: docker
|
||||
container: ruby:3.4-bookworm
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: "Setup"
|
||||
- run: |
|
||||
bundle config set path vendor/bundle
|
||||
bundle install --jobs=4 --retry=3
|
||||
command -v rsync >/dev/null || ( apt-get update -y && apt-get install rsync -y )
|
||||
command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )
|
||||
eval $(ssh-agent -s)
|
||||
echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
||||
mkdir -p ~/.ssh
|
||||
chmod 700 ~/.ssh
|
||||
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
|
||||
chmod 644 ~/.ssh/known_hosts
|
||||
./bin/deploy.sh
|
||||
Loading…
Add table
Add a link
Reference in a new issue