Merge pull request 'woutervermeer-patch-3' (#3) from woutervermeer-patch-3 into pre-prod
All checks were successful
Gitea build & Test. / docker (push) Successful in 6s
All checks were successful
Gitea build & Test. / docker (push) Successful in 6s
Reviewed-on: woutervermeer/Quatsh-Website#3
This commit was merged in pull request #3.
This commit is contained in:
@@ -4,6 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
- pre-prod
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
36
.gitea/workflows/deploy.yml
Normal file
36
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
name: Deploy to production
|
||||||
|
run-name: deploy-${{ gitea.actor }}
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: tests # require tests to pass
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup SSH
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa
|
||||||
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
ssh-keyscan -H ${{ secrets.DEPLOY_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
run: |
|
||||||
|
ssh -i ~/.ssh/id_rsa ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} << 'EOF'
|
||||||
|
cd /path/to/Quatsh-Website
|
||||||
|
|
||||||
|
echo "Pulling latest code..."
|
||||||
|
git pull origin main
|
||||||
|
|
||||||
|
echo "Building containers..."
|
||||||
|
make prod
|
||||||
|
|
||||||
|
echo "Deployment complete."
|
||||||
|
EOF
|
||||||
Reference in New Issue
Block a user