Heroku-Semaphore的Laravel PHP部署

我在Heroku分支机构的GitHub dev上有一个应用程序。我正在使用Semaphore进行持续集成和部署。

当我在Github上推我的dev分支时,Semaphore开始工作了,如果一切顺利,我可以点击“ Promote”,将其部署到Heroku /.semaphore/heroku.yml文件。

在点击推广之前,我将其保存在~/public目录中:

升级前的目录内容:

Heroku-Semaphore的Laravel PHP部署

请注意/app/storage/app/public上的“存储”链接。

在我的~/storage/app/public/images/users中,我有很多用户头像:

目录中的用户头像列表

Heroku-Semaphore的Laravel PHP部署

现在,我单击“在信号量中升级”。一切顺利:

信号灯正常

Heroku-Semaphore的Laravel PHP部署

但是...促销之后,这就是我在Heroku上的东西...

~/public中,我的存储链接已消失:

存储链接消失:

Heroku-Semaphore的Laravel PHP部署

在我的公共存储中,~/storage/app/public中没有任何目录,所有用户头像(最初在~/storage/app/public/images/users中)已被删除:

所有内容都不见了:

Heroku-Semaphore的Laravel PHP部署

我认为是因为这些文件不在我的GitHub目录中,这完全正常。

但是我认为Semaphore正在删除目录中的所有内容,并将所有存在于Github中的文件推送...

我使用git push heroku -f $SEMAPHORE_GIT_BRANCH:master,这是我的

Heroku.yml文件:

# .semaphore/heroku.yml
version: v1.0
name: Heroku DEV deployment
agent:
  machine:
    type: e1-standard-2
    os_image: ubuntu1804

blocks:
  - name: Deploy
    task:
      secrets:
        - name: scenario-dev
      env_vars:
        - name: HEROKU_REMOTE
          value: https://git.heroku.com/scenario-dev.git
      jobs:
      - name: Push code
        commands:
          - checkout --use-cache
          - ssh-keyscan -H heroku.com >> ~/.ssh/known_hosts
          - chmod 600 ~/.ssh/id_rsa_semaphore_heroku_dev
          - ssh-add ~/.ssh/id_rsa_semaphore_heroku_dev
          - git config --global url.ssh://git@heroku.com/.insteadOf https://git.heroku.com/
          - git remote add heroku $HEROKU_REMOTE
          - git push heroku -f $SEMAPHORE_GIT_BRANCH:master

我想我已经错过了配置文件中的某些内容。谢谢大家的帮助!

rmb001 回答:Heroku-Semaphore的Laravel PHP部署

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3145447.html

大家都在问