Updating readme

This commit is contained in:
Sam Kirkland 2019-08-31 17:11:09 -05:00 committed by GitHub
parent fe67ba0caa
commit 25b4cb7043
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@ Automate deploying websites and more with this GitHub action.
![Action](images/action.png) ![Action](images/action.png)
### Usage (Your_Project/.github/workflows/push.yaml) ### Usage (Your_Project/.github/workflows/main.yml)
``` ```
on: push on: push
name: Publish Website name: Publish Website
@ -24,7 +24,7 @@ jobs:
1. Select the repository you want to add the action to 1. Select the repository you want to add the action to
2. Select the actions tab `(currently only for beta testers)` 2. Select the actions tab `(currently only for beta testers)`
3. Select `Blank workflow file` or `Set up a workflow yourself`, if you don't see these options manually create a yaml file `Your_Project/.github/workflows/push.yaml` 3. Select `Blank workflow file` or `Set up a workflow yourself`, if you don't see these options manually create a yaml file `Your_Project/.github/workflows/main.yml`
4. Paste the above code into your file and save 4. Paste the above code into your file and save
7. Now you need to add a few keys to the `secrets` section in your project, the following are required at a minimum. To add a `secret` go to the `Settings` tab in your project then select `Secrets`. Add a new `Secret` for each of the following 7. Now you need to add a few keys to the `secrets` section in your project, the following are required at a minimum. To add a `secret` go to the `Settings` tab in your project then select `Secrets`. Add a new `Secret` for each of the following
* FTP_USERNAME * FTP_USERNAME
@ -40,31 +40,13 @@ To add a `secret` go to the `Settings` tab in your project then select `Secrets`
| FTP_USERNAME | Yes | git-action@samkirkland.com | N/A | FTP account username | | FTP_USERNAME | Yes | git-action@samkirkland.com | N/A | FTP account username |
| FTP_PASSWORD | Yes | CrazyUniquePassword&%123 | N/A | FTP account password | | FTP_PASSWORD | Yes | CrazyUniquePassword&%123 | N/A | FTP account password |
| FTP_SERVER | Yes | ftp.samkirkland.com | N/A | FTP server name (you may need to specify a port) | | FTP_SERVER | Yes | ftp.samkirkland.com | N/A | FTP server name (you may need to specify a port) |
| LOCAL_DIR | No | | / | The local folder to copy, defaults to root project folder | | LOCAL_DIR | No | build | N/A (root project folder) | The local folder to copy, defaults to root project folder |
| REMOTE_DIR | No | | / | The remote folder to copy to, deafults to root FTP folder (I recommend you configure this on your server side instead of here) | | REMOTE_DIR | No | serverFolder | N/A (root FTP folder) | The remote folder to copy to, deafults to root FTP folder (I recommend you configure this on your server side instead of here) |
## Common Examples ## Common Examples
### Building and deploying a javascript website - [Building and deploying a javascript website](https://github.com/SamKirkland/FTP-Deploy-Action-Example-React)
``` - Want another example? Let me know by creating a github issue
on: push
name: Build and Publish Website
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Project setup
run: npm install
- name: Compile javascript
run: npm run build
- name : FTP-Deploy
uses: SamKirkland/FTP-Deploy-Action@master
env:
FTP_SERVER : ${{ secrets.FTP_SERVER }}
FTP_PASSWORD : ${{ secrets.FTP_PASSWORD }}
FTP_USERNAME : ${{ secrets.FTP_USERNAME }}
```
### What does this action do exactly? ### What does this action do exactly?