This commit is contained in:
parent
64a50ccd10
commit
c49f2280f4
2 changed files with 26 additions and 2 deletions
26
.forgejo/workflows/deploy.yaml
Normal file
26
.forgejo/workflows/deploy.yaml
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
env:
|
||||||
|
REMOTE: ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}
|
||||||
|
PORT: ${{ secrets.SSH_PORT }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- name: Set up SSH keys
|
||||||
|
run: |
|
||||||
|
mkdir -m 700 -p ~/.ssh
|
||||||
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_deploy
|
||||||
|
chmod 600 ~/.ssh/id_deploy
|
||||||
|
|
||||||
|
- name: Pull latest branch to production
|
||||||
|
run: |
|
||||||
|
ssh-keyscan -p $PORT ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
ssh -i ~/.ssh/id_deploy -p $PORT ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} <<EOF
|
||||||
|
cd ${{ secrets.SSH_DIRECTORY }}
|
||||||
|
git pull
|
||||||
|
EOF
|
||||||
2
Makefile
2
Makefile
|
|
@ -1,2 +0,0 @@
|
||||||
bundle:
|
|
||||||
tar czf ./blisstown-web.tar.gz -C public .
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue