Обновить .gitea/workflows/gitea-actions.yml

This commit is contained in:
Dhaverd 2024-03-18 19:10:21 +03:00
parent 23f215c928
commit 6fbd16030f

View File

@ -12,43 +12,37 @@ jobs:
echo "${{ secrets.ENVIRONMENT }}" > ./.env echo "${{ secrets.ENVIRONMENT }}" > ./.env
cat ./.env cat ./.env
- name: Install Node - name: Install Node
run: apt install nodejs uses: actions/setup-node@v4
with:
node-version: 18
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install PHP - name: Install PHP
run: | uses: shivammathur/setup-php@v2
apt install apt-transport-https lsb-release ca-certificates wget -y with:
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg php-version: '8.2'
sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' extensions: curl, exif, fileinfo, mbstring, mysqli, mysqlnd, openssl, PDO, pdo_mysql
apt update
apt install php8.2 php8.2-cli php-8.2{bz2,curl,mbstring,intl} php8.2-fpm
- name: Install Composer
run: |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
php -r "unlink('composer-setup.php');"
php composer.phar install
php composer.phar dump-autoload
- name: Update npm dependencies - name: Update npm dependencies
run: | run: |
node -v node -v
npm i --progress=false npm i --progress=false
- name: Update composer dependencies - name: Update composer dependencies
run: | uses: php-actions/composer@v6
export COMPOSER_ALLOW_SUPERUSER=1 with:
composer show command:
composer install composer install
- name: Build frontend - name: Build frontend
run: pwd; npm run build; run: npm run build
- name: Deploy to Server - name: Deploy to Server
uses: https://gitea.com/aquelle1/ssh-deploy@main run: echo "Eto ewe v razrabotke"
env: # uses: https://gitea.com/aquelle1/ssh-deploy@main
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }} #env:
ARGS: "-rlgoDzvc -i --delete" # SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }}
REMOTE_HOST: ${{ secrets.SSH_HOST }} # ARGS: "-rlgoDzvc -i --delete"
REMOTE_USER: ${{ secrets.SSH_USER }} # REMOTE_HOST: ${{ secrets.SSH_HOST }}
TARGET: ${{ secrets.SSH_DIR }} # REMOTE_USER: ${{ secrets.SSH_USER }}
SCRIPT_BEFORE: | # TARGET: ${{ secrets.SSH_DIR }}
systemctl stop resume # SCRIPT_BEFORE: |
SCRIPT_AFTER: | # systemctl stop resume
systemctl start resume # SCRIPT_AFTER: |
# systemctl start resume