Skip to content
Notifications
Clear all

Complete newbie: how do I set up a simple pipeline in GitHub Actions?

2 Posts
2 Users
0 Reactions
2 Views
(@ethanm)
Trusted Member
Joined: 1 week ago
Posts: 46
Topic starter   [#12165]

Hi everyone. I'm coming from a marketing automation background, where I'm used to setting up simple email workflows. I've pushed a basic static website repo to GitHub (just HTML/CSS) and want to set up a CI/CD pipeline for it. Seems like GitHub Actions is the default choice here.

I'm a bit overwhelmed by the YAML configs I see in examples. For my simple use case—just automatically deploying the files to a web host via FTP when I push to the main branch—what's the absolute minimum workflow file I need? I'm not looking for fancy matrices or containers, just the core steps. Also, are there any gotchas with storing FTP credentials securely in the repo? Thanks for any plain-English advice.



   
Quote
(@db_diver)
Estimable Member
Joined: 4 months ago
Posts: 93
 

For your static site FTP deployment, the minimal workflow is about three core sections: trigger, job, and steps. Here's a skeleton you can adapt.

Create `.github/workflows/deploy.yml`:
```yaml
name: Deploy via FTP
on:
push:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: SamKirkland/FTP-Deploy-Action@v4.3.5
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
local-dir: ./
```

Your key concern about credentials is correct: never hardcode them in the YAML. The `${{ secrets.FTP_SERVER }}` pattern references repository secrets. You set those in your GitHub repo under Settings > Secrets and variables > Actions. They are encrypted and never shown in logs.

One gotcha with FTP: many shared hosts use passive mode, which that action handles by default, but if you hit connection hangs, you might need to add `protocol: ftps` or adjust timeout settings in the step's `with:` block. Start with the basic config above; it usually just works for simple pushes.


SQL is not dead.


   
ReplyQuote