New-site/.gitea/workflows/gitea-actions.yml
Dhaverd 788027b9a3
All checks were successful
Gitea Actions / Build and deploy (push) Successful in 6m0s
Обновить .gitea/workflows/gitea-actions.yml
2024-03-19 04:59:41 +03:00

47 lines
1.5 KiB
YAML

name: Gitea Actions
run-name: ${{ gitea.actor }} is testing out Gitea Actions ??
on: [push]
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu-latest
env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.COMPOSER_AUTH }}"}}'
name: Build and deploy
steps:
- name: Migrate env file
run: |
echo "${{ secrets.ENVIRONMENT }}" > ./.env
cat ./.env
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Checkout code
uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: curl, exif, fileinfo, mbstring, mysqli, mysqlnd, openssl, PDO, pdo_mysql
- name: Update npm dependencies
run: |
node -v
npm i --progress=false
- name: Update composer dependencies
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "locked"
- name: Build frontend
run: npm run build
- name: Deploy to Server
uses: https://gitea.com/aquelle1/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }}
ARGS: "-rlgoDzvc -i --delete"
SOURCE: "./"
REMOTE_HOST: ${{ secrets.SSH_HOST }}
REMOTE_USER: ${{ secrets.SSH_USER }}
TARGET: ${{ secrets.SSH_DIR }}
SCRIPT_BEFORE: systemctl stop resume
SCRIPT_AFTER: systemctl start resume