docs: remove unnecessary section from README for clarity #197
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Salam Website | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
if: github.repository == 'SalamLang/Salam-Website' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Run and deploy | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.SERVER_HOST }} | |
username: ${{ secrets.SERVER_USERNAME }} | |
password: ${{ secrets.SERVER_PASSWORD }} | |
port: ${{ secrets.SERVER_PORT }} | |
script: | | |
cd ${{ secrets.SERVER_PATH }} | |
git fetch --all | |
git pull | |
npm i -g bun | |
bun install --force | |
bun run build | |
if [ $? -eq 0 ]; then | |
if [ -f "package.json" ]; then | |
if pm2 describe "salamlang-website" > /dev/null; then | |
pm2 restart "salamlang-website" | |
else | |
pm2 start --name "salamlang-website" "npm run start -- -p 3001" | |
fi | |
pm2 save | |
else | |
echo "package.json not found. Skipping start/restart." | |
fi | |
else | |
echo "Build failed. Skipping PM2 restart." | |
fi |