Skip to content

deploy database migration #1

deploy database migration

deploy database migration #1

name: deploy database migration
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 }}