name: Gitea Actions run-name: ${{ gitea.actor }} is testing out Gitea Actions ?? on: [push] jobs: Explore-Gitea-Actions: runs-on: ubuntu-latest name: Build and deploy steps: - name: Migrate env file run: | echo "${{ secrets.ENVIRONMENT }}" > ./.env cat ./.env - name: Checkout code uses: actions/checkout@v3 - name: Install PHP run: | sudo add-apt-repository ppa:ondrej/php 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 run: | node -v npm i --progress=false - name: Update composer dependencies run: | export COMPOSER_ALLOW_SUPERUSER=1 composer show composer install - name: Build frontend run: pwd; 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" REMOTE_HOST: ${{ secrets.SSH_HOST }} REMOTE_USER: ${{ secrets.SSH_USER }} TARGET: ${{ secrets.SSH_DIR }} SCRIPT_BEFORE: | systemctl stop resume SCRIPT_AFTER: | systemctl start resume