Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YARN problem #1143

Open
thelubomir opened this issue Oct 5, 2024 · 2 comments
Open

YARN problem #1143

thelubomir opened this issue Oct 5, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@thelubomir
Copy link

Hello! here is my pipeline
name: Deploy to DEV server

on:
push:
branches:
- dev

jobs:
deploy_dev:
runs-on: self-hosted

steps:
  - name: Checkout code
    uses: actions/checkout@v4
    with:
      ref: dev

  - name: Set up SSH
    uses: webfactory/[email protected]
    with:
      ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY_RUNNER }}

  - name: Add SSH known hosts
    run: |
      mkdir -p ~/.ssh
      ssh-keyscan -p ${{ secrets.SSH_PORT }} ${{ secrets.HOST_DEV }} >> ~/.ssh/known_hosts

  - name: Deploy to server
    run: |
      ssh -p ${{ secrets.SSH_PORT }} ${{ secrets.HOST_USER }}@${{ secrets.HOST_DEV }} << 'EOF'
        cd /home/app
        git checkout dev
        git pull origin dev
        yarn
        yarn db:migrate
        pm2 restart crm_backend
      EOF

In "deploy to server" section got errors:
-bash: line 4: yarn: command not found
-bash: line 5: yarn: command not found
/usr/bin/env: ‘node’: No such file or directory

Could you please help with how to fix?

@thelubomir thelubomir added bug Something isn't working needs triage labels Oct 5, 2024
@gowridurgad
Copy link

Hi @thelubomir 👋,
Thank you for reporting this issue. We will investigate it and get back to you as soon as we have some feedback.

@mahalakshmi-rekadi mahalakshmi-rekadi self-assigned this Oct 7, 2024
@mahalakshmi-rekadi
Copy link

Hello @thelubomir , The errors you're encountering in the "Deploy to server" section indicate that the yarn command and node are not found on the remote server. This issue is not related to the setup-node step in the GitHub Actions workflow itself, but rather to the environment on the remote server where the deployment is being executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants