-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: experiment with auto deployment to idcloudhost shared-hosting
Signed-off-by: Fery Wardiyanto <[email protected]>
- Loading branch information
1 parent
4f49ef1
commit 50c004c
Showing
3 changed files
with
42 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,32 +61,47 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Cache Composer dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ needs.prepare.outputs.composer-cache }} | ||
key: php-8.1-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: php-8.1-composer- | ||
|
||
- name: Download assets | ||
id: download | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: build-${{ env.APP_ENV }} | ||
path: public | ||
|
||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-interaction --no-progress --ansi | ||
|
||
- name: Deploy | ||
uses: deployphp/action@master | ||
env: | ||
DB_USERNAME: ${{ secrets.DB_USERNAME }} | ||
DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | ||
DB_RESET: ${{ github.event_name == 'workflow_dispatch' && inputs.reset || false }} | ||
DEPLOY_ARGS: --branch ${{ needs.prepare.outputs.target-branch }} --${{ env.DB_RESET == 'true' && 'reset' || 'no-reset' }} | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
private-key: ${{ secrets.DEPLOY_SSH_RSAKEY }} | ||
ssh-config: ${{ secrets.DEPLOY_SSH_CONFIG }} | ||
verbosity: '' | ||
dep: deploy -f scripts/deploy.php env=staging ${{ env.DEPLOY_ARGS }} | ||
ssh-strict: false | ||
ssh-key: ${{ secrets.DEPLOY_SSH_RSAKEY }} | ||
repository: [email protected]:~/git/creasico-skeleton.git | ||
path: storage/deploy-tmp | ||
fetch-depth: 0 | ||
|
||
- name: Prepare deployment | ||
run: | | ||
composer extract | ||
cd storage/deploy-tmp | ||
git status | ||
# - name: Cache Composer dependencies | ||
# uses: actions/cache@v4 | ||
# with: | ||
# path: ${{ needs.prepare.outputs.composer-cache }} | ||
# key: php-8.1-composer-${{ hashFiles('**/composer.lock') }} | ||
# restore-keys: php-8.1-composer- | ||
|
||
# - name: Install dependencies | ||
# run: composer install --prefer-dist --no-interaction --no-progress --ansi | ||
|
||
# - name: Deploy | ||
# uses: deployphp/action@master | ||
# env: | ||
# DB_USERNAME: ${{ secrets.DB_USERNAME }} | ||
# DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | ||
# DB_RESET: ${{ github.event_name == 'workflow_dispatch' && inputs.reset || false }} | ||
# DEPLOY_ARGS: --branch ${{ needs.prepare.outputs.target-branch }} --${{ env.DB_RESET == 'true' && 'reset' || 'no-reset' }} | ||
# with: | ||
# private-key: ${{ secrets.DEPLOY_SSH_RSAKEY }} | ||
# ssh-config: ${{ secrets.DEPLOY_SSH_CONFIG }} | ||
# verbosity: '' | ||
# dep: deploy -f scripts/deploy.php env=staging ${{ env.DEPLOY_ARGS }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/deploy-tmp |