Skip to content

Merge branch 'main' of github.com:inikoo/wowsbar #44

Merge branch 'main' of github.com:inikoo/wowsbar

Merge branch 'main' of github.com:inikoo/wowsbar #44

name: Deploy Wowsbar staging
on:
push:
branches: [ "staging" ]
concurrency: staging_environment
permissions:
contents: write
jobs:
laravel-tests:
name: Deploy wowsbar staging 🎭
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- 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-
- name: Composer install
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d-%T')" >> $GITHUB_OUTPUT
- name: Set .env
run: |
touch .env.wowsbar.staging.deploy
echo RELEASE=${{ steps.date.outputs.date }} >> .env.wowsbar.staging.deploy
echo DEPLOY_REMOTE_USER=${{ secrets.STAGING_DEPLOY_REMOTE_USER }} >> .env.wowsbar.staging.deploy
- name: Launch 🚀
uses: deployphp/action@v1
with:
dep: deploy staging
ssh-config: ${{ secrets.DEPLOY_SSH_CONFIG }}
private-key: ${{ secrets.DEPLOYER_PRIVATE_KEY }}
known-hosts: ${{ secrets.DEPLOYER_KNOWN_HOSTS }}
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
with:
environment: staging
projects: ${{ secrets.SENTRY_PROJECTS }}
version: ${{ steps.date.outputs.date }}