Merge pull request #418 from wayofdev/fix/infection #336
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
--- | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: | |
- develop | |
name: 🚀 Deploy to staging | |
env: | |
# Disable docker support in Makefile | |
APP_RUNNER: 'cd app &&' | |
concurrency: staging | |
jobs: | |
deployment: | |
timeout-minutes: 8 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
php-version: | |
- '8.3' | |
dependencies: | |
- locked | |
environment: | |
name: staging | |
url: https://staging.laravel-starter-tpl.wayof.dev | |
steps: | |
- name: 🛠️ Setup PHP | |
uses: shivammathur/setup-php@2.30.5 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: curl, libxml, mbstring, zip, fileinfo, decimal, pdo, pdo_mysql | |
ini-values: error_reporting=E_ALL | |
coverage: none | |
- name: 📦 Check out the codebase | |
uses: actions/checkout@v4.1.6 | |
with: | |
fetch-depth: 0 | |
- name: 🛠️ Setup problem matchers | |
run: | | |
echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
- name: 🤖 Validate composer.json and composer.lock | |
run: make validate-composer | |
- name: 🔍 Get composer cache directory | |
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.1 | |
with: | |
working-directory: app | |
- name: ♻️ Restore cached dependencies installed with composer | |
uses: actions/cache@v4.0.2 | |
with: | |
path: ${{ env.COMPOSER_CACHE_DIR }} | |
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }} | |
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}- | |
- name: 📥 Install "${{ matrix.dependencies }}" dependencies with composer | |
uses: wayofdev/gh-actions/actions/composer/install@v3.1.1 | |
with: | |
working-directory: app | |
dependencies: ${{ matrix.dependencies }} | |
- name: 📤 Deploy staging environment | |
uses: deployphp/action@v1 | |
with: | |
private-key: ${{ secrets.DEPLOYER_PRIVATE_KEY }} | |
dep: deploy staging | |
deployer-version: 7.4.0 | |
sub-directory: app | |
env: | |
DEPLOYER_STAGING_SLACK_WEBHOOK: ${{ secrets.DEPLOYER_STAGING_SLACK_WEBHOOK }} | |
DEPLOYER_STAGING_REMOTE_USER: ${{ secrets.DEPLOYER_STAGING_REMOTE_USER }} | |
DEPLOYER_STAGING_HOST: staging.laravel-starter-tpl.wayof.dev | |
DEPLOYER_STAGING_BRANCH: develop | |
... |