v2.3.0 #10
Workflow file for this run
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 | |
release: | |
types: | |
- released | |
name: 🚀 Deploy to production | |
env: | |
# Disable docker support in Makefile | |
APP_RUNNER: 'cd app &&' | |
concurrency: production | |
jobs: | |
deployment: | |
timeout-minutes: 8 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
php-version: | |
- '8.3' | |
dependencies: | |
- locked | |
environment: | |
name: production | |
url: https://prod.laravel-starter-tpl.wayof.dev | |
steps: | |
- name: 🛠️ Setup PHP | |
uses: shivammathur/[email protected] | |
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/[email protected] | |
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/[email protected] | |
with: | |
working-directory: app | |
- name: ♻️ Restore cached dependencies installed with composer | |
uses: actions/[email protected] | |
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/[email protected] | |
with: | |
working-directory: app | |
dependencies: ${{ matrix.dependencies }} | |
- name: 📤 Deploy production environment | |
uses: deployphp/action@v1 | |
with: | |
private-key: ${{ secrets.DEPLOYER_PRIVATE_KEY }} | |
dep: deploy prod | |
deployer-version: 7.4.0 | |
sub-directory: app | |
env: | |
DEPLOYER_PROD_SLACK_WEBHOOK: ${{ secrets.DEPLOYER_PROD_SLACK_WEBHOOK }} | |
DEPLOYER_PROD_REMOTE_USER: ${{ secrets.DEPLOYER_PROD_REMOTE_USER }} | |
DEPLOYER_PROD_HOST: prod.laravel-starter-tpl.wayof.dev | |
DEPLOYER_PROD_BRANCH: master | |
- name: 📦 Create sentry release | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.DEPLOYER_SENTRY_TOKEN }} | |
SENTRY_ORG: ${{ secrets.DEPLOYER_SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ secrets.DEPLOYER_SENTRY_PROJECT }} | |
SENTRY_URL: ${{ secrets.DEPLOYER_SENTRY_SERVER }} | |
with: | |
environment: production | |
... |