{"id":20976903,"url":"https://github.com/pixelbrackets/pap","last_synced_at":"2026-04-27T09:02:13.346Z","repository":{"id":57042003,"uuid":"285226711","full_name":"pixelbrackets/pap","owner":"pixelbrackets","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-14T22:44:03.000Z","size":757,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-15T04:23:56.763Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://gitlab.com/pixelbrackets/pap","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pixelbrackets.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-08-05T08:23:27.000Z","updated_at":"2026-02-14T22:43:37.000Z","dependencies_parsed_at":"2022-08-23T23:40:09.339Z","dependency_job_id":null,"html_url":"https://github.com/pixelbrackets/pap","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/pixelbrackets/pap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelbrackets%2Fpap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelbrackets%2Fpap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelbrackets%2Fpap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelbrackets%2Fpap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pixelbrackets","download_url":"https://codeload.github.com/pixelbrackets/pap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelbrackets%2Fpap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32329466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T04:56:16.860Z","updated_at":"2026-04-27T09:02:13.340Z","avatar_url":"https://github.com/pixelbrackets.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PAP\n\n![Logo](./docs/icon.png)\n\n**P**HP **A**pp **P**ublication\n\n[![Version](https://img.shields.io/packagist/v/pixelbrackets/pap.svg?style=flat-square)](https://packagist.org/packages/pixelbrackets/pap/)\n[![Build Status](https://img.shields.io/gitlab/pipeline/pixelbrackets/pap?style=flat-square)](https://gitlab.com/pixelbrackets/pap/pipelines)\n[![Made With](https://img.shields.io/badge/made_with-php-blue?style=flat-square)](https://gitlab.com/pixelbrackets/pap#requirements)\n[![License](https://img.shields.io/badge/license-gpl--2.0--or--later-blue.svg?style=flat-square)](https://spdx.org/licenses/GPL-2.0-or-later.html)\n[![Contribution](https://img.shields.io/badge/contributions_welcome-%F0%9F%94%B0-brightgreen.svg?labelColor=brightgreen\u0026style=flat-square)](https://gitlab.com/pixelbrackets/pap/-/blob/master/CONTRIBUTING.md)\n\nToolchain to publish a PHP App. One YAML file. One command set. Any project.\n\n**⚡ Same commands in every project** - Learn once, use everywhere.\nNo need to memorize different deployment steps for each project.\n\n**📝 One YAML file** - All deployment configuration in one place.\nNo scattered scripts, no complex build tools.\n\n**🚀 15 minute setup** - Add PAP to any project in minutes.\nNo coupling with your app code, works as standalone build directory.\n\n**👥 Team and CI-friendly** - New teammates and CI robots can deploy\nwithout understanding the internals. Just one command: `pap publish`.\n\n![Screenshot](./docs/screenshot.png)\n\n## What it does\n\n- Build Assets - Minify \u0026 concat CSS, JavaScript, SVG assets\n- Build App - Prepare expected directory structures \u0026 fetch packages\n- Lint - Identify errors before the app is running\n- Unit Test - Run unit tests against local code\n- Deploy - Sync files to configurable target stages (local, test, live, …)\n- Verify - Do a smoke test to verify that the app is still working\n- Test - Run integration tests against deployed app\n\n## Design Principles\n\n**KISS approach** - Not made for every condition, but easy to use and integrate\n\n- Fixed set of task commands (but you can run custom scripts within them)\n- YAML configuration with local overrides support\n- Works as standalone build directory (no coupling with app code)\n- CI/CD friendly - same commands work for humans and robots\n- Minimal requirements: Git, PHP, Composer, rsync, SSH\n- Multiple deployment stages (local, test, live, …)\n- Monorepo support\n- No rollback (use Git to revert changes)\n- No provisioning (deploy only)\n\nWhen to use alternatives: Need custom task workflows, atomic releases, advanced rollback strategies,\nor server provisioning? Tools like [Deployer](https://deployer.org/), [Capistrano](https://capistranorb.com/),\nor [Ansible](https://www.ansible.com/) offer more features. PAPs sweet spot is that it is *deliberately* simple -\nperfect for small to medium projects where complexity isn't worth the overhead.\n\n## Requirements\n\n- cURL, SSH \u0026 rsync\n- Git\n- PHP\n- Composer\n- SSH-Account on target stage(s) with read \u0026 write access,\n  and right to run cURL, rsync and PHP\n\n## Source\n\nhttps://gitlab.com/pixelbrackets/pap/\n\nMirror https://github.com/pixelbrackets/pap/ (Issues \u0026 Pull Requests\nmirrored to GitLab)\n\n## Installation\n\n### New Projects\n\nThe recommend way to add PAP to a new project is to use the provided\n[skeleton package](https://github.com/pixelbrackets/pap-skeleton).\nThis creates a `build/` directory with all required configuration files and\nthe PAP executable in one command.\n\n```bash\ncomposer create-project pixelbrackets/pap-skeleton build\ncd build\n./vendor/bin/pap list\n```\n\nNow edit `pap.yml` to configure your deployment stages.\n\nAlternatively, add PAP to an existing directory and use the built-in init wizard\nto generate configuration files interactively:\n\n```bash\ncomposer require pixelbrackets/pap\n./vendor/bin/pap init\n```\n\nThe wizard asks for stage name, SSH credentials, sync paths and more,\nthen generates the according `pap.yml` file.\n\n**📚 New to PAP?** Follow the [step-by-step walkthrough tutorial](./docs/walktrough.md) to\nlearn how to set up PAP and publish your PHP webapp or website (~15 minutes).\n\n### Existing Projects\n\nIf your project already has a `build/` directory with PAP configuration files,\nthen all you need to do is fetching PAP using Composer, no additional setup required.\n\n```bash\ncd build\ncomposer install\n./vendor/bin/pap list\n```\n\n### Global Installation (Advanced)\n\nFor special use cases like global installation, team consistency, or CI environments,\nyou can install PAP as a phar executable or self-contained binary.\n\nDistribution repository: https://github.com/pixelbrackets/pap-dist/releases\n\n**Binary** (Linux):\n\n```bash\nwget https://github.com/pixelbrackets/pap-dist/releases/latest/download/pap-linux-x64\nsudo mv pap-linux-x64 /usr/local/bin/pap\nsudo chmod +x /usr/local/bin/pap\npap list\n```\n\nThe binary bundles a specific PHP version, so it works independent of your projects PHP version.\n**Security Note:** The bundled PHP version may lag behind security updates. For production deployments\nwithin public CI workflows, prefer the standard Composer installation to control PHP updates via system updates.\n\n**PHAR** (all platforms):\n\n```bash\nwget https://github.com/pixelbrackets/pap-dist/releases/latest/download/pap.phar\nphp pap.phar list\n```\n\n### CI/CD Usage\n\n**GitLab CI example:**\n\n```yaml\ndeploy:\n  stage: deploy\n  image: composer:latest\n  script:\n    - cd build \u0026\u0026 composer install  # Installs PAP via Composer\n    - vendor/bin/pap deploy live # Deploy app to live stage using the versioned configuration files\n```\n\n**GitHub Actions example:**\n\n```yaml\n- name: Install dependencies\n  run: cd build \u0026\u0026 composer install\n\n- name: Deploy\n  run: cd build \u0026\u0026 vendor/bin/pap deploy live\n```\n\n## Configuration\n\nPAP is configured with YAML files:\n\n- **`pap.yml`** - Shared settings and stages (committed to Git)\n- **`pap.local.yml`** - Local overrides (add to `.gitignore`)\n\n**The skeleton package provides these files as templates.** Just edit `pap.yml` to configure:\n- Deployment stages (local, test, live)\n- Sync paths (which files to deploy)\n- Build tasks (assets, dependencies)\n- Lint and test commands\n\nAll configuration paths are relative to your Git repository root, so you can place the configuration\nin any subdirectory (typically `build/`) and are still good to go.\n\n- 📖 [Walkthrough: Publish your first app](./docs/walktrough.md) - Complete beginner guide with example app (15 min)\n- 📝 [Reference: All available configuration options](./docs/configuration.md)\n- 🛠️ [Tutorial: Manual setup without skeleton package](./docs/configuration.md#manual-setup) (advanced)\n\n## Updates\n\nSee [Upgrade Guide](./docs/upgrade-guide.md)\n\n## Usage\n\nThis section gives a brief overview of available commands and common tasks.\n\n**Quick Tips:**\n- Run `./vendor/bin/pap` to see all available tasks\n- Add `--help` to each task command to see all available options\n- Add `--simulate` to each task command to run in dry-mode first\n- Most tasks have a stage as target, passed as argument (eg. `deploy live`) or with `--stage \u003cstagename\u003e`\n  - If no stagename is passed, the name \"local\" is used as default - use this for development on your local machine\n\nSomme common tasks are:\n\n**Deploy to live stage:**\n```bash\n./vendor/bin/pap deploy live\n```\n\n**Deploy to local stage (default, for development):**\n```bash\n./vendor/bin/pap deploy\n```\n\n**Sync files without building assets:**\n```bash\n./vendor/bin/pap sync\n```\n\n**Watch and auto-sync on file changes:**\n```bash\n./vendor/bin/pap watch              # Defaults to local stage\n./vendor/bin/pap watch live         # Watch and sync to live stage\n```\n\n**Lint files:**\n```bash\n./vendor/bin/pap lint\n```\n\n**SSH:**\n```bash\n./vendor/bin/pap ssh test                    # Open interactive shell on test stage\n./vendor/bin/pap ssh:exec test \"php -v\"      # Execute single command\n```\n\n**Examine:**\n```bash\n./vendor/bin/pap view live # Opens the live stage URL in default browser\n```\n\n**Verify:**\n```bash\n./vendor/bin/pap show stages # Show all configured stages and their details\n```\n\n### Commands\n\n**Task Hierarchy** - Understanding the full publication stack:\n\n```\npublish (Complete release workflow)\n├── lint (Validate code syntax)\n├── test:unit (Run unit tests against local code)\n├── deploy (Full deployment)\n│   ├── build (Prepare application)\n│   │   ├── buildassets (Process CSS/JS/images)\n│   │   └── buildapp (Prepare directory structure and install composer dependencies locally)\n│   ├── sync (Transfer files via rsync)\n│   └── composer:install (Install remaining dependencies and trigger post-install commands on target stage)\n├── test:smoke (Quick HTTP check)\n└── test:integration (Run integration tests against deployed app)\n\nCommon standalone tasks:\n├── init (Generate configuration interactively)\n├── show stages (Get a list of all configured stages)\n├── sync (Quick file sync without rebuilding)\n├── watch (Auto-sync on file changes)\n├── lint:fix (Auto-fix code style issues)\n├── ssh:connect (SSH into stage)\n├── ssh:exec (Execute command on stage)\n└── view (Open stage URL in browser)\n```\n\n**All Available Commands:**\n\n\u003c!-- Generate using `./bin/pap list` and sort alphabetically --\u003e\n\n```\nbuild             Alias to run »buildassets« and »buildapp«\nbuildapp          Build PHP structure for desired target stage (move files, fetch dependencies)\nbuildassets       Build HTML assets (convert, concat, minify…)\ncomposer:command  Execute Composer command in working directory on target stage\ncomposer:install  Install packages with Composer\ndeploy            Run full deployment stack (build, sync, composer command)\nhelp              Display help for a command\ninit              Generate configuration interactively\nlint              Alias to run »lint:check«\nlint:check        Lint files (Check only)\nlint:fix          Lint files (Fix)\nlist              List commands\npublish           Run full publication stack (lint, test:unit, deploy, test:smoke, test:integration)\nshow              Pretty print configuration for debugging\nssh               Alias to run »ssh:connect«\nssh:connect       Open SSH connection to target stage\nssh:exec          Execute command in working directory on target stage via SSH\nsync              Synchronize files to target stage\ntest              Alias to run »test:integration«\ntest:integration  Run integration tests against target stage\ntest:smoke        Run a build verification test against target stage\ntest:unit         Run unit tests against local code\nview              Open the public URL of target stage in the browser\nwatch             Sync changed files automatically to target stage\n```\n\n## License\n\nGNU General Public License version 2 or later\n\nThe GNU General Public License can be found at https://www.gnu.org/copyleft/gpl.html.\n\n## Author\n\nDan Kleine (\u003cmail@pixelbrackets.de\u003e / [@pixelbrackets](https://pixelbrackets.de))\n\n## Changelog\n\nSee [CHANGELOG.md](./CHANGELOG.md)\n\n## Contribution\n\nThis script is Open Source, so please use, share, patch, extend or fork it.\n\n[Contributions](./CONTRIBUTING.md) are welcome!\n\n## Feedback\n\nPlease send some [feedback](https://pixelbrackets.de/) and share how this\npackage has proven useful to you or how you may help to improve it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelbrackets%2Fpap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixelbrackets%2Fpap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelbrackets%2Fpap/lists"}