This commit is contained in:
parent
64a50ccd10
commit
097d8241d0
2 changed files with 27 additions and 2 deletions
27
.forgejo/workflows/deploy.yaml
Normal file
27
.forgejo/workflows/deploy.yaml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
REMOTE: ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}
|
||||
PORT: ${{ secrets.SSH_PORT }}
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: docker
|
||||
needs: build
|
||||
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 $REMOTE >> ~/.ssh/known_hosts
|
||||
ssh $REMOTE -p $PORT <<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