Comments (6)
Sorry, I was wrong. It is using the the right folder. The above code is working!
from ftp-deploy-action.
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.
Sorry, but can you show how to do that in code?
from ftp-deploy-action.
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.
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.
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)
- Multiple main.yml files HOT 1
- Error: None of the available transfer modes work. HOT 4
- Omit initial complete upload HOT 1
- Support for sftp? HOT 1
- throw timeout error HOT 5
- throw timeout error HOT 2
- Error: None of the available transfer strategies work. HOT 1
- FTPError: 550 ~partytown: No such file or directory HOT 5
- Error: Timeout (control socket) HOT 1
- Just upload without syncing HOT 2
- Files not deployed to the server
- on deploy laravel 10
- .deployignore (instead of exclude)
- Support for "--ignore-time" HOT 4
- Server sent FIN packet unexpectedly when deploying
- Just Figure out the files that were changed in last commit and upload those on the server? HOT 3
- FTPError: 451-Error during read from data connection error. HOT 1
- Error : 530 login authentication failed HOT 2
- Node.js 16 actions are deprecated HOT 6
- add the 'include' parameter HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ftp-deploy-action.