【发布时间】:2021-11-23 19:42:30
【问题描述】:
我有一个 deployment.yml 文件,用于通过 Github 操作在自托管的 ubuntu 服务器上部署 Laravel 应用程序,但不幸的是我遇到了这个错误
==> Setup PHP
✗ PHP Could not setup PHP 7.3
Error: The process '/bin/bash' failed with exit code 1
我该如何解决这个错误?
deployment.yml 文件
on:
push:
branches:
- master
jobs:
create-deployment-artifacts:
name: create deployment artifacts
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- name: Configure PHP 7.3
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
tools: composer, phpunit
extensions: mbstring,PDO,grpc,tokenizer,xml,json,ctype,fileinfo,openssl,bcmath
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Compile Assets
run: |
npm install
npm run prod
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
【问题讨论】:
标签: php laravel yaml github-actions