Merge remote-tracking branch 'origin/main' #430
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
name: Deploy Aiku | |
on: | |
push: | |
branches: [ "production" ] | |
concurrency: production_deployment | |
permissions: | |
contents: write | |
jobs: | |
deployment: | |
name: Deploy aiku 🚀 | |
runs-on: ubuntu-latest | |
environment: production | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 5 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.3' | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Composer install | |
run: php8.3 /usr/local/bin/composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- name: Get Next Version | |
id: semver | |
uses: ietf-tools/semver-action@v1 | |
with: | |
token: ${{ github.token }} | |
branch: production | |
noVersionBumpBehavior: current | |
noNewCommitBehavior: current | |
majorList: MAJOR-RELEASE! | |
minorList: feature, features, feat, features, enhancement, enhancements | |
patchList: small, fix, bugfix, perf, refactor, test, tests, clean, cleanup, pint, partial, review, update-deps, chores, review, update, upgrade, change, changes, improve, improves, improvement, improvements,new, added, add, adds | |
patchAll: true | |
- name: Set .env | |
run: | | |
touch .env.aiku.production.deploy | |
echo RELEASE=${{ steps.semver.outputs.next }} >> .env.aiku.production.deploy | |
- name: Launch 🚀 | |
uses: deployphp/action@v1 | |
with: | |
dep: deploy aiku | |
ssh-config: ${{ secrets.DEPLOY_SSH_CONFIG }} | |
private-key: ${{ secrets.DEPLOY_PRIVATE_KEY }} | |
known-hosts: ${{ secrets.DEPLOY_KNOWN_HOSTS }} | |
- name: Create Release | |
uses: ncipollo/release-action@v1.12.0 | |
with: | |
allowUpdates: true | |
draft: false | |
makeLatest: true | |
name: ${{ steps.semver.outputs.next }} | |
commit: 'production' | |
tag: ${{ steps.semver.outputs.next }} | |
token: ${{ github.token }} | |
- name: New Relic Application Deployment Marker | |
uses: newrelic/deployment-marker-action@v2.3.0 | |
with: | |
apiKey: ${{ secrets.NEW_RELIC_API_KEY }} | |
guid: aiku | |
version: ${{ steps.semver.outputs.next }} | |
user: "${{ github.actor }}" | |
- name: Create Sentry release | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
with: | |
environment: production | |
projects: ${{ secrets.SENTRY_PROJECTS }} | |
version: ${{ steps.semver.outputs.next }} |