Skip to content

Commit

Permalink
feat: update
Browse files Browse the repository at this point in the history
  • Loading branch information
ezralazuardy committed Oct 10, 2023
1 parent 9afe09d commit eb1fb31
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/deploy-migration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Deploy

on:
workflow_dispatch:
branches: [ production, staging ]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: πŸ“₯ Install Github Action Checkout
uses: actions/checkout@v3

- name: πŸ“₯ Install Docker Layer Caching
uses: docker/setup-buildx-action@v1

- name: πŸ“₯ Install QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64

- name: πŸ“₯ Install Node.js v16
uses: actions/setup-node@v3
with:
node-version: 16

- name: πŸ“₯ Install Yarn Dependencies
uses: borales/actions-yarn@v4
with:
cmd: install

- name: πŸ“₯ Install PHP v8.2 and Composer v2
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer:v2
coverage: none

- name: πŸ“¦ Install Vapor CLI
run: composer global require laravel/vapor-cli

- name: πŸ“¦ Install Composer Dependencies
uses: ramsey/composer-install@v2
with:
composer-options: "--no-interaction --prefer-dist --optimize-autoloader --no-progress --no-ansi --no-dev --classmap-authoritative"

- name: ☁️ Deploy Environment
run: vapor command ${{ github.ref_name }} --message="php artisan migrate:fresh --seed --force"
env:
VAPOR_API_TOKEN: ${{ secrets.VAPOR_API_TOKEN }}
7 changes: 7 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
],
"dev": [
"composer dump-autoload",
"@php artisan package:discover --ansi",
"@php artisan ide-helper:generate",
"@php artisan ide-helper:models -W",
"@php artisan ide-helper:meta"
]
},
"extra": {
Expand Down

0 comments on commit eb1fb31

Please sign in to comment.