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

Error on cd build on line 50 in deploy.sh #1

Open
gardinermichael opened this issue Nov 11, 2020 · 4 comments
Open

Error on cd build on line 50 in deploy.sh #1

gardinermichael opened this issue Nov 11, 2020 · 4 comments

Comments

@gardinermichael
Copy link

Hi there,

First off, thank you for this action -- I'm attempting to deploy to WPEngine and it's been a godsend.

To start things off, here is my yml file:

# Basic workflow that is manually triggered

name: Manual workflow

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - name: Checkout Code
      uses: actions/checkout@v2
      with:
        path: clone
      
    - name: Install Yarn Dependecies
      run: yarn
      working-directory: ./clone
        
    - name: Install PHP Dependencies
      run: composer install --no-ansi --no-dev --no-interaction --optimize-autoloader --no-progress
      working-directory: ./clone
 
    - name: Build compiled files
      run: |
        yarn build
        yarn build:production
      working-directory: ./clone
        
    - name: Deploy to WP Engine
      id: wpengine_deploy
      uses: linchpin/action-wpengine-deploy@master
      env:
        PROJECT_TYPE: ${{ secrets.PROJECT_TYPE }}
        REPO_NAME: ${{ secrets.REPO_NAME }}
        WPE_SSH_KEY_PRIVATE: ${{ secrets.WPE_SSH_KEY_PRIVATE }}
        WPE_SSH_KEY_PUBLIC: ${{ secrets.WPE_SSH_KEY_PUBLIC }}
        WPE_INSTALL: ${{ secrets.WPE_INSTALL }}

And here is the error that I'm getting:

Screen Shot 2020-11-11 at 2 06 26 PM

I'm wondering why this line (50) in deploy.sh is included:

cd build

I'm building the files in the theme's root directory and don't have a build folder, so that part is obvious, but I'm a bit confused as to the codeship reference in the comments above the line. I'm also not sure how to use said build folder as it was my impression that we're working in the ./clone folder.

I guess I was hoping for a little bit of clarification since I'm not sure exactly what's happening but I will fork your repo and tinker around a little bit.

@aaronware
Copy link
Contributor

aaronware commented Nov 11, 2020

Hey @gardinermichael as you said this might actually be an artifact from our old CI/CD tool CodeShip. We actually don't utilize this action anymore and have migrated our internal deployments to rsync https://github.com/linchpin/rsync-deploy along with a bunch of other supporting actions https://github.com/linchpin?q=action

@aaronware
Copy link
Contributor

If you do resolve it please provide a pull request and I'll merge it in after a review. More than likely you can get rid of the cd build if the directory structure isn't the same in the action. This was working previously as we do have some projects using it but maybe things changed after actions were out of beta.

@gardinermichael
Copy link
Author

Well the good news I got it to work by changing the build to clone! I'm not sure if the fix is only for my setup, although I have a pretty basic one.

However, I'm wondering how necessary it is to boot up a docker container for what I can tell is mostly just ssh and git. Would you happen to know if it's possible to do those commands within the github action workflow outright, instead of loading up a docker container for them? I only ask as the files are built within the github action container. Or are they the same container and I'm just hopelessly confused?

@aaronware
Copy link
Contributor

aaronware commented Nov 16, 2020

I think all actions are containerized? And I think that is the case any time you have individual actions (vs tasks). I think it will make containers and then if you wanted to pass data you would make artifacts. But in theory it is just a bunch of ssh commands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants