Files
action-server-install/QUICK_START.md
2026-02-14 16:28:51 -05:00

3.1 KiB

Quick Start Guide

Get started with the Server Install Action in minutes!

1. Choose Your Components

The action installs the Nodarx server and can set up Node.js, PHP, and/or nginx based on your needs.

2. Basic Examples

Node.js Only (Unit Tests)

name: Node.js Tests
on: [push]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: Nodarx/action-server-install@v2
        with:
          install-node: 'true'

PHP Only (Unit Tests)

name: PHP Tests
on: [push]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: Nodarx/action-server-install@v2
        with:
          install-php: 'true'

All Components (Integration Tests)

name: Integration Tests
on: [push]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: Nodarx/action-server-install@v2
        with:
          install-node: 'true'
          install-php: 'true'
          install-nginx: 'true'

3. Customize Components

Node.js with Specific Version

- uses: Nodarx/action-server-install@v2
  with:
    install-node: 'true'
    node-version: '20'
    package-manager: 'pnpm'  # or 'npm', 'yarn'

PHP with Custom Extensions

- uses: Nodarx/action-server-install@v2
  with:
    install-php: 'true'
    php-version: '8.2'
    php-extensions: 'mbstring, xml, pdo, pdo_mysql'

nginx with Custom Config

- uses: Nodarx/action-server-install@v2
  with:
    install-nginx: 'true'
    nginx-config: './config/nginx.conf'

4. Component Combinations

You can enable any combination of components:

# Node.js + nginx (for frontend tests)
install-node: 'true'
install-nginx: 'true'

# PHP + nginx (for backend tests)
install-php: 'true'  
install-nginx: 'true'

# All three (full integration)
install-node: 'true'
install-php: 'true'
install-nginx: 'true'

5. Common Options

- uses: Nodarx/action-server-install@v2
  with:
    # Components (at least one required)
    install-node: 'true'      # Install Node.js
    install-php: 'true'       # Install PHP
    install-nginx: 'true'     # Install nginx
    
    # Server configuration
    server-path: './server'   # Where to clone (default)
    
    # Node.js options (if install-node: true)
    node-version: '20'
    package-manager: 'npm'
    
    # PHP options (if install-php: true)
    php-version: '8.2'
    php-extensions: 'mbstring, xml, ctype'
    
    # nginx options (if install-nginx: true)
    nginx-config: './nginx.conf'
    
    # General options
    install-dependencies: 'true'
    build-command: 'npm run build'
    env-file: '.env.production'
    post-install-script: './scripts/setup.sh'

Need Help?