问题描述
我正在积极使用 github action 对我的 laravel 应用程序进行 CI/CD,使用下面的工作流.yml 总是成功
name: Laravel
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-PHP@15c43e89cdef867065b0213be354c2841860869e
with:
PHP-version: '8.0'
- uses: actions/checkout@v2
- name: copy .env
run: PHP -r "file_exists('.env') || copy('.env.example','.env');"
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Generate key
run: PHP artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Create Database
run: |
mkdir -p database
touch database/database.sqlite
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: vendor/bin/PHPunit
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/[email protected] # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: ${{secrets.HEROKU_APP_NAME}} #Must be unique in Heroku
heroku_email: ${{secrets.HEROKU_EMAIL}}
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
但是站点返回 Forbidden You don't have permission to access this resource.
我可能缺少什么,我已经将 .htaccess 和 procfile 添加到我的根目录中,但仍然无法正常工作。
注意:我正在尝试将 Laravel 用作我的移动应用应用程序的 REST API。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)