diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..56574e3 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,27 @@ +name: deploy + +on: + push: + branches: [master] + +concurrency: production_environment + +jobs: + deploy: + runs-on: linux-x64 + + steps: + - uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: "8.1" + + - name: Install dependencies + run: composer install + + - name: Deploy + uses: deployphp/action@v1 + with: + dep: deploy \ No newline at end of file diff --git a/composer.json b/composer.json index 16a7f7a..e8a8a64 100644 --- a/composer.json +++ b/composer.json @@ -23,6 +23,7 @@ }, "require-dev": { "barryvdh/laravel-debugbar": "^3.7", + "deployer/deployer": "^7.3", "fakerphp/faker": "^1.9.1", "laravel/sail": "^1.0.1", "mockery/mockery": "^1.4.4", diff --git a/composer.lock b/composer.lock index 493ff22..4049c26 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ad6ab448ac9b62b01922490669b4c2b2", + "content-hash": "86cdd8c61f5c7ee9dee51ebeae179259", "packages": [ { "name": "bacon/bacon-qr-code", @@ -8787,6 +8787,49 @@ ], "time": "2023-08-25T18:43:57+00:00" }, + { + "name": "deployer/deployer", + "version": "v7.3.3", + "source": { + "type": "git", + "url": "https://github.com/deployphp/deployer.git", + "reference": "3535bdb2f6360662bd95f6e26fce31dbc269af64" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/deployphp/deployer/zipball/3535bdb2f6360662bd95f6e26fce31dbc269af64", + "reference": "3535bdb2f6360662bd95f6e26fce31dbc269af64", + "shasum": "" + }, + "bin": [ + "dep" + ], + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Medvedev", + "email": "anton@medv.io" + } + ], + "description": "Deployment Tool", + "homepage": "https://deployer.org", + "support": { + "docs": "https://deployer.org/docs", + "issues": "https://github.com/deployphp/deployer/issues", + "source": "https://github.com/deployphp/deployer" + }, + "funding": [ + { + "url": "https://github.com/sponsors/antonmedv", + "type": "github" + } + ], + "time": "2023-11-07T10:27:12+00:00" + }, { "name": "doctrine/instantiator", "version": "2.0.0", diff --git a/deploy.yaml b/deploy.yaml new file mode 100644 index 0000000..e8df165 --- /dev/null +++ b/deploy.yaml @@ -0,0 +1,17 @@ +import: + - recipe/laravel.php + +config: + repository: 'https://git.bh.ttx.sk/jaro/ikea/' + +hosts: + web01.ttx.sk: + remote_user: git + deploy_path: '/var/www/html/ikea' + +tasks: + build: + - run: uptime + +after: + deploy:failed: deploy:unlock