150 lines
3.1 KiB
Markdown
150 lines
3.1 KiB
Markdown
# 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)
|
|
|
|
```yaml
|
|
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)
|
|
|
|
```yaml
|
|
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)
|
|
|
|
```yaml
|
|
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
|
|
|
|
```yaml
|
|
- uses: Nodarx/action-server-install@v2
|
|
with:
|
|
install-node: 'true'
|
|
node-version: '20'
|
|
package-manager: 'pnpm' # or 'npm', 'yarn'
|
|
```
|
|
|
|
### PHP with Custom Extensions
|
|
|
|
```yaml
|
|
- 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
|
|
|
|
```yaml
|
|
- 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:
|
|
|
|
```yaml
|
|
# 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
|
|
|
|
```yaml
|
|
- 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'
|
|
```
|
|
|
|
- Check the [README.md](README.md) for detailed documentation
|
|
- See [test workflow](.github/workflows/test.yml) for more usage examples
|
|
- Read [CONTRIBUTING.md](CONTRIBUTING.md) to contribute
|
|
- Report issues or request features in [Issues](../../issues)
|
|
|
|
## Need Help?
|
|
|
|
- 📖 [Full Documentation](README.md)
|
|
- 💬 [Discussions](../../discussions)
|
|
- 🐛 [Report a Bug](../../issues/new?template=bug_report.md)
|
|
- ✨ [Request a Feature](../../issues/new?template=feature_request.md)
|