From 1942106633ae2dc86cc2d7453d73e78605d77979 Mon Sep 17 00:00:00 2001 From: UzSoftic Date: Sun, 19 Mar 2023 16:18:10 +0500 Subject: [PATCH] update --- .github/workflows/github-actions-demo.yml | 27 ----------------------- deploy.sh | 22 ------------------ 2 files changed, 49 deletions(-) delete mode 100644 .github/workflows/github-actions-demo.yml delete mode 100644 deploy.sh diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml deleted file mode 100644 index a1e92ba..0000000 --- a/.github/workflows/github-actions-demo.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: GitHub Actions Main -on: - push: - branches: - - main -jobs: - Explore-GitHub-Actions: - runs-on: ubuntu-latest - steps: - - name: Stats - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - name: Install SSH Key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.PRIVATE_KEY }} - known_hosts: 'just-a-placeholder-so-we-dont-get-errors' - - name: Adding Known Hosts - run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - - uses: actions/checkout@v2 - - run: git checkout main - - run: sudo apt-get update && sudo apt-get install -y openssh-client - - run: chmod +x ./deploy.sh - - name: Deploy on test environment - run: cat ./deploy.sh | ssh root@128.199.83.230 - - run: echo "Deploying to test environment" diff --git a/deploy.sh b/deploy.sh deleted file mode 100644 index 8a53981..0000000 --- a/deploy.sh +++ /dev/null @@ -1,22 +0,0 @@ -set -eu -set -o pipefail -echo "Deploy script started" -cd /usr/share/nginx/html/soft_ui_dashboard_laravel_free/ # go to project repository on the server -git fetch --all -php8.0 artisan down -git reset --hard origin/main -php8.0 /usr/local/bin/composer install --no-interaction #install php part -php8.0 artisan migrate:fresh --seed -php8.0 artisan optimize:clear -php8.0 artisan view:clear -php8.0 artisan route:clear -php8.0 artisan config:clear -php8.0 artisan view:cache -php8.0 artisan route:cache -php8.0 artisan storage:link -chown -R www-data:www-data /usr/share/nginx/html/soft_ui_dashboard_laravel_free/ #change here too project repository -php8.0 artisan up -source ~/.nvm/nvm.sh -npm install -npm run prod -echo "Deploy script finished execution"