Giter Club home page Giter Club logo

Comments (8)

EzeRangel avatar EzeRangel commented on June 13, 2024

In the docs you have this example to render templates

 - name: Render templates
        if: ${{ steps.project.outputs.deployment-enabled == 'true' }}
        uses: ionos-deploy-now/template-renderer-action@feature/improvements

But there's an error with the version for the action. I changed to uses: ionos-deploy-now/template-renderer-action@v1 and the process worked as expected.

from ionos-deploy-now.

EzeRangel avatar EzeRangel commented on June 13, 2024

Well after some days of testing I can't make this work. I think my app can't understand what Deploy Now renders as my DB env vars

This is what I see in the Deployment Viewer:
DATABASE_URL=mysql://@DB_USERNAME@:"@DB_PASSWORD@"@@DB_HOST@:3306/@DB_NAME@ I just don't know if this is correct or if I'm missing something.

from ionos-deploy-now.

coder-hugo avatar coder-hugo commented on June 13, 2024

Hi @EzeRangel ,

I just saw that the example workflow in the docs is incomplete. These placeholders will be replaced by the deploy-to-ionos-action. For this the action requires an additional parameter. If you add the following line to the with section it should work:

runtime-placeholder-files: ${{ steps.template.outputs.runtime-placeholder-files }}

from ionos-deploy-now.

EzeRangel avatar EzeRangel commented on June 13, 2024

Thanks for the advice @coder-hugo

I edited my workflow file accordingly but I get the same results, the output for my env files it's still the same.

from ionos-deploy-now.

coder-hugo avatar coder-hugo commented on June 13, 2024

Hi @EzeRangel,

as I don't have access to your repository it's hard to tell what's wrong. I just can see the build logs at the moment. The log of the last build just lists the following parameters:

2022-06-29T12:54:00.9005892Z with:
2022-06-29T12:54:00.9006381Z   project: ***
2022-06-29T12:54:00.9006655Z   branch-id: f555e58c-8c4a-4b12-96e6-47f4f55217eb
2022-06-29T12:54:00.9006964Z   service-host: api-us.ionos.space
2022-06-29T12:54:00.9007806Z   api-key: ***
2022-06-29T12:54:00.9008045Z   dist-folder: ./

So the runtime-placeholder-files still is missing.

from ionos-deploy-now.

EzeRangel avatar EzeRangel commented on June 13, 2024

Yes that is the log I see too.

But for some reason, the deploy action ignores the runtime-placeholder-files line.

This is my deploy-now.yaml file:

# To better understand this file read this:
# https://docs.ionos.space/docs/github-actions-customization/

name: Deploy Now

on:
    - push
    - workflow_dispatch

jobs:
    deploy-now:
        runs-on: ubuntu-latest
        permissions:
            contents: read
            packages: write
        steps:
            - name: Fetch project data
              uses: ionos-deploy-now/retrieve-project-info-action@v1
              id: project
              with:
                  api-key: ${{ secrets.IONOS_API_KEY }}
                  project: ${{ secrets.IONOS_PROJECT_ID }}
                  service-host: api-us.ionos.space

            - name: checkout
              if: ${{ steps.project.outputs.deployment-enabled == 'true' }}
              uses: actions/checkout@v2
              with:
                  submodules: "recursive"

            - name: Setup composer
              if: ${{ steps.project.outputs.deployment-enabled == 'true' }}
              uses: php-actions/composer@v6
              with:
                  php_version: "8.0"
                  version: "2"
                  args: --optimize-autoloader --no-dev

            - name: Render templates
              if: ${{ steps.project.outputs.deployment-enabled == 'true' }}
              uses: ionos-deploy-now/template-renderer-action@v1
              with:
                  secrets: |
                      bolt:
                        secret: ${{ secrets.APP_SECRET }}

            - name: Build PHP assets
              env:
                  APP_ENV: prod
              run: composer dump-env prod --empty

            - name: Deploy to IONOS
              if: ${{ steps.project.outputs.deployment-enabled == 'true' }}
              uses: ionos-deploy-now/deploy-to-ionos-action@v1
              with:
                  project: ${{ secrets.IONOS_PROJECT_ID }}
                  branch-id: ${{ steps.project.outputs.branch-id }}
                  service-host: api-us.ionos.space
                  api-key: ${{ secrets.IONOS_API_KEY }}
                  runtime-placeholder-files: ${{ steps.template.outputs.runtime-placeholder-files }}
                  dist-folder: ./

from ionos-deploy-now.

coder-hugo avatar coder-hugo commented on June 13, 2024

Strange. I'd say this looks good. Could you grant me or the Deploy Now support user (@ionos-deploy-now-support) access to your repository. This will make it more easy to find the error.

from ionos-deploy-now.

EzeRangel avatar EzeRangel commented on June 13, 2024

Hi Robin,

Due to the project timeline I had to remove it from Deploy Now and try it on another place. Hope to try this service another time :)

from ionos-deploy-now.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.