Skip to content

Commit

Permalink
release: 1.1.15
Browse files Browse the repository at this point in the history
  • Loading branch information
SadraTghvi committed Sep 29, 2024
2 parents a13dfaf + 970f29e commit 8d9c39f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ jobs:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
command_timeout: 1h
script: bash /heydari/config/deploy.sh
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ main.db*
logs/
__pycache__/
backup/
log
*.db*
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.8
1.1.15
13 changes: 10 additions & 3 deletions config/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,18 @@ fi
if check_diff "src/*"; then
echo "$EG cargo build"
cargo build --release
systemctl restart heydari
echo $SPACER
fi

echo "$EG restart backend"
systemctl restart heydari
echo $SPACER
if check_diff "config/nginx.conf"; then
echo "$EG restart nginx"
if nginx -t; then
systemctl restart nginx
else
echo invalid nginx status ❌
fi
echo $SPACER
fi

echo "Deploy is Done! ✅"
4 changes: 3 additions & 1 deletion config/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ server {
# error_page 403 /error-403;

# Security Headers
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data: https://heydari-mi.com; connect-src 'self'; font-src 'self';";
# add_header Content-Security-Policy "default-src 'self' 'unsafe-inline' https://trustseal.enamad.ir https://simurgh.00-team.org https://www.googletagmanager.com https://www.google.com/";
add_header Content-Security-Policy "default-src 'self' 'unsafe-inline' *";
add_header Permissions-Policy "geolocation=(self), microphone=()";
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options SAMEORIGIN;
add_header X-XSS-Protection "1; mode=block";
Expand Down

0 comments on commit 8d9c39f

Please sign in to comment.