Giter Site home page Giter Site logo

Comments (6)

senner007 avatar senner007 commented on May 17, 2024 1

Sorry, I was wrong. It is using the the right folder. The above code is working!

from ftp-deploy-action.

SamKirkland avatar SamKirkland commented on May 17, 2024

Each action does a single task, if you'd like to build a project I'd recommend you use a npm build action.
After the build action completes you can run the FTP Deploy Action to deploy the built files :)

from ftp-deploy-action.

senner007 avatar senner007 commented on May 17, 2024

Sorry, but can you show how to do that in code?

from ftp-deploy-action.

SamKirkland avatar SamKirkland commented on May 17, 2024

You can start by copying the Node,js continuous integration starter
This will run "npm install", "npm build", then "npm test"
Once you have that working you can have that action trigger the FTP deploy action.

from ftp-deploy-action.

senner007 avatar senner007 commented on May 17, 2024

Ok. Do I need a workflow file AND a yml file?

How do I combine the Node,js continuous integration starter with my workflow?

workflow "ftp deploy" {
  resolves = ["FTP-Deploy-Action"]
  on = "push"
}

action "FTP-Deploy-Action" {
  uses = "SamKirkland/FTP-Deploy-Action@master"
  secrets = ["GITHUB_TOKEN", "FTP_SERVER", "FTP_PASSWORD", "FTP_USERNAME", "LOCAL_DIR", "REMOTE_DIR"]
}

I tried this also :

name: CI

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v1
    - name: Project setup
      run: npm install
    - name: Run unit tests
      run: npm run test:unit
    - name: Compile and minify for production
      run: npm run build
    - name : FTP-Deploy
    - secrets : 
      - GITHUB_TOKEN
      - FTP_SERVER
      - FTP_PASSWORD
      - FTP_USERNAME
      - LOCAL_DIR
      - REMOTE_DIR
    uses: SamKirkland/FTP-Deploy-Action@master

from ftp-deploy-action.

senner007 avatar senner007 commented on May 17, 2024

Ok. This appears to be the translation to yaml setup:
The only problem is that the LOCAL_DIR which is set to 'dist' is looking for /dist in the github repo and not in the /dist created with 'npm run build' command

name: CI

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v1
    - name: Project setup
      run: npm install
    # - name: Run unit tests
    #   run: npm run test:unit
    - name: Compile and minify for production
      run: npm run build
    - name : FTP-Deploy
      uses: SamKirkland/FTP-Deploy-Action@master
      env: 
       GITHUB_TOKEN :  ${{ secrets.GITHUB_TOKEN }}
       FTP_SERVER :  ${{ secrets.FTP_SERVER }}
       FTP_PASSWORD :  ${{ secrets.FTP_PASSWORD }}
       FTP_USERNAME :  ${{ secrets.FTP_USERNAME }}
       LOCAL_DIR :  ${{ secrets.LOCAL_DIR }}
       REMOTE_DIR :  ${{ secrets.REMOTE_DIR }}

from ftp-deploy-action.

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.