refactor(update.sh): improve update script reliability and clarity
Some checks failed
Deploy to production / deploy (push) Failing after 1s
Some checks failed
Deploy to production / deploy (push) Failing after 1s
- Changed shebang to use env for better portability. - Added error handling to ensure the script exits on failure. - Included a check to confirm the current branch is 'main' before proceeding. - Updated git commands to fetch and reset to origin/main, ensuring a clean state. - Enhanced user feedback messages for clarity.
This commit is contained in:
21
.gitea/workflows/deploy.yml
Normal file
21
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
name: Deploy to production
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Run deployment on production server
|
||||
uses: appleboy/ssh-action@v1.0.3
|
||||
with:
|
||||
host: ${{ secrets.PROD_HOST }}
|
||||
username: ${{ secrets.PROD_USER }}
|
||||
key: ${{ secrets.PROD_SSH_KEY }}
|
||||
port: ${{ secrets.PROD_PORT }}
|
||||
script: |
|
||||
/home/tsschulz/actualize-yourpart.sh
|
||||
Reference in New Issue
Block a user