Skip to content

Commit

Permalink
Merge branch 'master' into poland
Browse files Browse the repository at this point in the history
  • Loading branch information
Maryanushka committed Jan 2, 2025
2 parents b197042 + e8ed2b0 commit efad70e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 12 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ on:
jobs:
build_main:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }} # Unique group for each branch
cancel-in-progress: true # Cancel in-progress runs of the same group

steps:
# Step 1: Установка Node.js версии 18
Expand All @@ -30,10 +27,11 @@ jobs:
- name: Install Dependencies and Build
run: |
npm install --legacy-per-deps
npm nuxt build # Сборка проекта
npm run build # Сборка проекта
- uses: actions/checkout@v4
- name: Deploy with rsync
# Step 4: Deploy files with rsync
- name: Deploy with Rsync
uses: burnett01/rsync-deployments@7.0.1
with:
switches: -avzr --delete
Expand All @@ -42,6 +40,18 @@ jobs:
remote_user: ${{ secrets.REMOTE_USER }}
remote_key: ${{ secrets.REMOTE_KEY }}
remote_path: ${{ secrets.REMOTE_PATH }}

# Step 5: Выполнение дополнительных команд на сервере
- name: Run Commands on Remote Server
uses: appleboy/ssh-action@v1.2.0
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.REMOTE_KEY }}
script: |
cd /home/cyclone/fireon.com.ua/www
ls -la # Просматриваем файлы, чтобы убедиться в загрузке
echo "Deployment complete!"

21 changes: 15 additions & 6 deletions .github/workflows/poland.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ on:
jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }} # Unique group for each branch
cancel-in-progress: true # Cancel in-progress runs of the same group

steps:
# Step 1: Установка Node.js версии 18
Expand All @@ -30,10 +27,10 @@ jobs:
- name: Install Dependencies and Build
run: |
npm install --legacy-per-deps
npm nuxt build # Сборка проекта
npm run build # Сборка проекта
- uses: actions/checkout@v4
- name: Deploy with rsync
# Step 4: Deploy files with rsync
- name: Deploy with Rsync
uses: burnett01/rsync-deployments@7.0.1
with:
switches: -avzr --delete
Expand All @@ -42,5 +39,17 @@ jobs:
remote_user: ${{ secrets.REMOTE_USER }}
remote_key: ${{ secrets.REMOTE_KEY }}
remote_path: ${{ secrets.REMOTE_PATH_POLAND }}

# Step 5: Выполнение дополнительных команд на сервере
- name: Run Commands on Remote Server
uses: appleboy/ssh-action@v1.2.0
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.REMOTE_KEY }}
script: |
cd /home/cyclone/fireon.com.pl/www
ls -la # Просматриваем файлы, чтобы убедиться в загрузке
echo "Deployment complete!"

0 comments on commit efad70e

Please sign in to comment.