我正试图通过laravel蒸气来调配我的零钱,它告诉我:
/home/runner/work/_temp/c6e18c6d-a186-46b8-9628-a123b8013114.sh: line 1: Merge: command not found
/home/runner/work/_temp/c6e18c6d-a186-46b8-9628-a123b8013114.sh: line 3: hot-fix/vapor-issue: No such file or directory
Unable to find your project's dependencies. Please run the composer "install" command first.
Error: Process completed with exit code 1.我试图在vapor.yml中改变一些事情,但没有解决任何问题:
environments:
staging:
timeout: 10
concurrency: 94
warm: 20
storage: str-staging
memory: 768
cli-memory: 768
runtime: 'php-7.4'
database: db-development
scheduler: false
queue: true
queue-concurrency: 1
queue-timeout: 120
queue-memory: 768
mail: false
domain:
- staging.example.com
build:
- 'composer install -o --no-dev'
- 'php artisan event:cache'
- 'php artisan config:cache'
- 'php artisan route:cache'
deploy:
- 'php artisan migrate --force'知道吗?
发布于 2021-12-05 08:08:26
我找到了解决办法。
这是因为两个问题,它们都在yml配置中,在.github/workflows/中,我发现github在它们的操作中改变了一些东西。
我的yml配置有一个部分,如下所示:
- name: Deploy using Laravel Vapor
env:
VAPOR_API_TOKEN: ${{ secrets.VAPOR_API_TOKEN }}
run: /home/runner/.composer/vendor/bin/vapor deploy production --commit=`${{ github.event.head_commit.id }}` --message=`${{ github.event.head_commit.message }}`但是他们删除了处理后引号(`),所以我把它改为双引号:
- name: Deploy using Laravel Vapor
env:
VAPOR_API_TOKEN: ${{ secrets.VAPOR_API_TOKEN }}
run: /home/runner/.composer/vendor/bin/vapor deploy production --commit="${{ github.event.head_commit.id }}" --message="${{ github.event.head_commit.message }}"这解决了这两行问题:
/home/runner/work/_temp/c6e18c6d-a186-46b8-9628-a123b8013114.sh: line 1: Merge: command not found
/home/runner/work/_temp/c6e18c6d-a186-46b8-9628-a123b8013114.sh: line 3: hot-fix/vapor-issue: No such file or directory另一个问题是:
Unable to find your project's dependencies. Please run the composer "install" command first.
Error: Process completed with exit code 1.在使用laravel蒸气部署之前,我必须添加composer install:
yml配置更改:
- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction --no-dev
- name: Deploy using Laravel Vapor
env:
VAPOR_API_TOKEN: ${{ secrets.VAPOR_API_TOKEN }}
run: /home/runner/.composer/vendor/bin/vapor deploy production --commit="${{ github.event.head_commit.id }}" --message="${{ github.event.head_commit.message }}"这对我有帮助,我希望它能帮助到其他人。
https://stackoverflow.com/questions/70216400
复制相似问题