Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into midweste
Browse files Browse the repository at this point in the history
* origin/master: (40 commits)
  Improve the configuration options console output in provision:configure (deployphp#3840)
  Update Craft CMS deploy recipe (deployphp#3839)
  [automatic] Update docs with bin/docgen
  Update provision.php
  Feature/UI enhancements (deployphp#3835)
  Hotfix/v7.4.0: Fixes caddyfile and realpath errors in provision:website (deployphp#3837)
  [automatic] Update docs with bin/docgen
  docs(recipe/shopware): add code syntax highlighting (deployphp#3834)
  [automatic] Update docs with bin/docgen
  docs(recipe/magento2): fix typo in conccurent (deployphp#3830)
  [automatic] Update docs with bin/docgen
  magento2 theme processing fix for 3786 (deployphp#3818)
  use md5 of task name for section id in gitlab ci (deployphp#3817)
  [automatic] Update docs with bin/docgen
  Magento 2: Changed upgrading database (deployphp#3812)
  [automatic] Update docs with bin/docgen
  Shopware: Added `deploy:update_code` (deployphp#3816)
  [automatic] Update docs with bin/docgen
  Update nodejs to LTS version (deployphp#3815)
  Update LICENSE
  ...
  • Loading branch information
midwestE authored and midwestE committed May 31, 2024
2 parents 6fb6205 + 42ccdc8 commit 09aff9c
Show file tree
Hide file tree
Showing 32 changed files with 493 additions and 296 deletions.
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ contact_links:
- name: Ask question
url: https://github.com/deployphp/deployer/discussions/category_choices
about: Please ask questions in discussions.
- name: 💰 Paid Support
url: https://github.com/deployphp/deployer/discussions/3031
about: We can offer a paid support for Deployer.
8 changes: 4 additions & 4 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
phpstan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Validate composer.json and composer.lock
run: composer validate
Expand All @@ -20,7 +20,7 @@ jobs:
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -37,7 +37,7 @@ jobs:
phpcs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Validate composer.json and composer.lock
run: composer validate
Expand All @@ -47,7 +47,7 @@ jobs:
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
docgen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Validate composer.json and composer.lock
run: composer validate
Expand All @@ -20,7 +20,7 @@ jobs:
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
24 changes: 5 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ on:
types:
- created

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Get version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
Expand All @@ -18,23 +21,9 @@ jobs:
run: php -d phar.readonly=0 bin/build -v"$RELEASE_VERSION"

- name: Upload phar
run: |
export PATH=${PATH}:`go env GOPATH`/bin
export RELEASE_ID=$(curl --fail-with-body -L \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
https://api.github.com/repos/deployphp/deployer/releases \
| npx fx ".find(x=> x.tag_name == 'v${RELEASE_VERSION}').id")
curl --fail-with-body -L \
-X POST \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
-H "Content-Type: application/octet-stream" \
"https://uploads.github.com/repos/deployphp/deployer/releases/${RELEASE_ID}/assets?name=deployer.phar" \
--data-binary "@deployer.phar"
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN_FOR_UPLOADING_RELEASES }}
run: gh release upload ${{ github.event.release.tag_name }} deployer.phar

- name: Add deployer.phar
shell: bash
run: |
set -x
git checkout -b dist
Expand All @@ -43,21 +32,18 @@ jobs:
git add -f dep
- name: Remove obsolete files & dirs
shell: bash
run: |
set -x
git rm -r .github/ bin/ docs/ tests/ *.lock *.yaml *.xml *.neon
- name: Update composer.json
shell: bash
run: |
set -x
cat composer.json | jq 'del(.autoload) | del(.scripts) | del(.require) | del(."require-dev") | setpath(["bin"]; "dep")' > composer-new.json
mv composer-new.json composer.json
git add composer.json
- name: Push release tag
shell: bash
run: |
set -x
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
Expand Down
32 changes: 4 additions & 28 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,16 @@ on:
push:
branches: [ master ]

permissions:
contents: write

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Validate composer.json and composer.lock
run: composer validate

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- uses: actions/checkout@v4

- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress

- name: Run docgen
Expand All @@ -38,14 +25,3 @@ jobs:
add: 'docs'
message: '[automatic] Update docs with bin/docgen'

- name: Deploy docs
run: |
curl --fail-with-body --location --request POST 'https://api.github.com/repos/antonmedv/deployer.org/actions/workflows/deploy-docs.yml/dispatches' \
--header "Authorization: Bearer ${MY_GITHUB_TOKEN}" \
--header 'Accept: application/vnd.github.v3+json' \
--header 'Content-Type: application/json' \
--data-raw '{
"ref": "master"
}'
env:
MY_GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
matrix:
php-versions: [ '7.3', '7.4', '8.0', '8.1', '8.2' ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -30,7 +30,7 @@ jobs:
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -47,7 +47,7 @@ jobs:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: jpribyl/action-docker-layer-caching@v0.1.1
continue-on-error: true
Expand All @@ -60,7 +60,7 @@ jobs:
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright © 2013—2023 Anton Medvedev
Copyright © 2013 Anton Medvedev

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<a href="https://webpod.dev/?from=deployer"><img src="https://webpod.dev/img/banner.png" alt="Webpod - deploy JavaScript apps" width="190" align="right"></a>

<h1><a href="https://deployer.org"><img src="https://medv.io/assets/deployer/logo.png" alt="Deployer Logo" height="30"></a> Deployer</h1>
<p>The PHP deployment tool with support for popular frameworks out of the box.</p>

Expand Down
7 changes: 5 additions & 2 deletions bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,18 @@ foreach ($iterator as $fileInfo) {
// Add schema.json
echo "Add file: /src/schema.json\n";
$phar->addFile(realpath(__DIR__ . '/../src/schema.json'), '/src/schema.json');

// Add Caddyfile
echo "Add file: /Caddyfile\n";
$phar->addFile(realpath(__DIR__ . '/../recipe/provision/Caddyfile'), '/recipe/provision/Caddyfile');
// Add bin/dep file
echo "Add file: /bin/dep\n";
$depContent = file_get_contents(__ROOT__ . '/bin/dep');
$depContent = str_replace("#!/usr/bin/env php\n", '', $depContent);
$depContent = str_replace('__FILE__', 'str_replace("phar://", "", Phar::running())', $depContent);
$depContent = preg_replace("/run\('.+?'/", "run('$version'", $depContent);
$phar->addFromString('bin/dep', $depContent);
$phar->setStub(<<<STUB
$phar->setStub(
<<<STUB
#!/usr/bin/env php
<?php
Phar::mapPhar('{$pharName}');
Expand Down
12 changes: 10 additions & 2 deletions docs/recipe/craftcms.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,18 @@ Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `r

## Tasks

### craft:gc
[Source](https://github.com/deployphp/deployer/blob/master/recipe/craftcms.php#L120)

Runs garbage collection.




### deploy
[Source](https://github.com/deployphp/deployer/blob/master/recipe/craftcms.php#L64)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/craftcms.php#L127)

deploy.
Deploys Craft CMS.



Expand Down
16 changes: 8 additions & 8 deletions docs/recipe/deploy/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require 'recipe/deploy/release.php';

## Configuration
### release_name
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L8)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L9)

The name of the release.

Expand All @@ -26,7 +26,7 @@ return strval(intval($latest) + 1);


### releases_log
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L16)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L17)

Holds releases log from `.dep/releases_log` file.
:::info Autogenerated
Expand All @@ -37,7 +37,7 @@ The value of this configuration is autogenerated on access.


### releases_list
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L31)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L32)

Return list of release names on host.
:::info Autogenerated
Expand All @@ -48,7 +48,7 @@ The value of this configuration is autogenerated on access.


### release_path
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L58)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L59)

Return release path.
:::info Autogenerated
Expand All @@ -59,7 +59,7 @@ The value of this configuration is autogenerated on access.


### release_revision
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L69)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L70)

Current release revision. Usually a git hash.

Expand All @@ -69,7 +69,7 @@ return run('cat {{release_path}}/REVISION');


### release_or_current_path
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L75)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L76)

Return the release path during a deployment
but fallback to the current path otherwise.
Expand All @@ -84,15 +84,15 @@ return $releaseExists ? get('release_path') : get('current_path');
## Tasks

### deploy:release
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L82)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L83)

Prepares release.

Clean up unfinished releases and prepare next release


### releases
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L157)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L158)

Shows releases list.

Expand Down
Loading

0 comments on commit 09aff9c

Please sign in to comment.