question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Secrets/deploy.yml Location & NPM Commands

See original GitHub issue

When I use this action, can I keep deploy.yml:

import:
  - recipe/laravel.php
  - contrib/php-fpm.php
  - contrib/npm.php

config:
  application: 'smt-app'
  remote_user: forge
  deploy_path: '~/{{hostname}}'
  repository: 'git@github.com:site/site-app.git'
  php_fpm_version: '8.0'
  keep_releases: '10'
  shared_files: 
    - '.env'
    - '.transip_private_key'
    - 'storage/app/exact.api.json'
  shared_dirs:
    - 'bootstrap/cache'
    - 'public/uploads'
    - 'public/published'
    - 'storage/framework/cache'
    - 'storage/framework/sessions'
    - 'storage/framework/views'
    - 'storage/logs'
    - 'storage/tls'
    - 'storage/app/public'
    - 'storage/app/modules'
  writable_dirs:
    - 'public/uploads'
    - 'public/published'
    - 'storage/framework/cache/data'
    - 'storage/logs'
    - 'storage/tls'
    - 'storage/app/public'
    - 'storage/app/modules'

hosts:
  prod:
    hostname: 'site.com'
  staging:
    hostname: 'staging.site.com'

tasks:
  deploy:
    - deploy:prepare
    - deploy:vendors
    - artisan:storage:link
    - artisan:view:cache
    - artisan:config:cache
    - artisan:optimize
    - artisan:migrate
    - artisan:queue:restart    
    - artisan:horizon:terminate
    - deploy:publish

after:
  deploy:symlink: php-fpm:reload
  deploy:failed: deploy:unlock

in the root of the Laravel/Vue project?

Two, where do we add the secrets?

Three, will the action run npm install and npm run prod inside the image as well? I mean, I can add this to the deploy.yml but better to get that done in the image/ on Github and then deploy like we do now. Only now we build locally.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jasperfcommented, Feb 18, 2022

On using build matrices I found an explanation here https://docs.github.com/en/actions/using-jobs/using-a-build-matrix-for-your-jobs and example

strategy:
  matrix:
    node: [10, 12, 14]
steps:
  # Configures the node version used on GitHub-hosted runners
  - uses: actions/setup-node@v2
    with:
      # The Node.js version to configure
      node-version: ${{ matrix.node }}

Thanks to @antonmedv feedback and some more reading I am slowly starting to understand. Thanks Anton!

1reaction
antonmedvcommented, Feb 17, 2022

Yes this can be loaded from the github secrets this is like a special field in settings with the hub

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration and secrets | Node.js - werf
ConfigMap and Secret Kubernetes resources allow you to separate environment-dependent and context-specific configuration from container images. Both objects ...
Read more >
Managing Secrets using Configuration File - Kubernetes
You can define the Secret object in a manifest first, in JSON or YAML format, and then create that object. The Secret resource...
Read more >
Using private packages in a CI/CD workflow - npm Docs
You can use access tokens to test private npm packages with continuous integration (CI) systems, or deploy them using continuous deployment (CD) systems....
Read more >
Configuring build settings - AWS Amplify Hosting
Configure the build settings for an app deployed with Amplify Hosting. ... npm ci build: commands: - npm run build artifacts: files: -...
Read more >
Running Composer and npm scripts with deployment via SCP ...
To make this work, you must add a GitLab CI/CD Variable (accessible on gitlab.example/your-project-name/variables ). Name this variable STAGING_PRIVATE_KEY and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found