38 lines
1.2 KiB
YAML
38 lines
1.2 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
jobs:
|
|
test:
|
|
runs-on: docker
|
|
container:
|
|
image: "oreolek/php8node:latest"
|
|
env:
|
|
phpver: "8.3"
|
|
path: ${{ secrets.DEPLOY_PATH_MAIN }}
|
|
steps:
|
|
- name: Set up git permissions
|
|
run: |
|
|
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
- name: Get latest code
|
|
uses: "https://code.forgejo.org/actions/checkout@v4"
|
|
- name: Install Composer dependencies
|
|
uses: "https://github.com/ramsey/composer-install@v3"
|
|
with:
|
|
composer-options: "--no-dev --optimize-autoloader"
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
- name: Run build
|
|
run: pnpm run production
|
|
- name: Sync files
|
|
uses: "https://github.com/burnett01/rsync-deployments@7.0.1"
|
|
with:
|
|
switches: "-avzr '--exclude=/.git' '--exclude=/.editorconfig' '--exclude=/.forgejo' '--exclude=/tests' '--exclude=/.pnpm-store' '--exclude=/node_modules'"
|
|
remote_path: ${{ env.path }}
|
|
remote_host: ${{ secrets.DEPLOY_HOST }}
|
|
remote_user: ${{ secrets.DEPLOY_USER }}
|
|
remote_key: ${{ secrets.DEPLOY_KEY }}
|