Automatic upload with Github Actions
How to automate uploading from GitHub to Simply.com with GitHub Actions via FTP or SSH
It is possible to automatically upload your GitHub repository by using GitHub Actions.
We can recommend the following:
- https://github.com/marketplace/actions/ftp-deploy (FTP)
- https://github.com/marketplace/actions/ssh-deploy (SSH)
- https://github.com/marketplace/actions/web-deploy-anything (SSH)
Examples
1. FTP‑deploy with ftp‑deploy
name: Deploy til Simply.com (FTP)
on:
push:
branches: [ main ]
jobs:
ftp-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Upload via FTP
uses: SamKirkland/FTP-Deploy-Action@4
with:
server: ftp.simply.com # dit FTP‑server
username: ${{ secrets.FTP_USER }} # brugernavn gemt som secret
password: ${{ secrets.FTP_PASS }} # adgangskode gemt som secret
local-dir: ./public # mappe med de filer, der skal deployes
server-dir: /public_html # destination på serveren
2. SSH‑deploy with ssh‑deploy
name: Deploy til Simply.com (SSH)
on:
push:
branches: [ main ]
jobs:
ssh-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Deploy via SSH
uses: appleboy/ssh-action@v0.1.10
with:
host: ssh.simply.com
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
script: |
rsync -avz --delete ./public/ ${{ secrets.SSH_USER }}@ssh.simply.com:/public_html/
3. Web‑deploy‑anything (SSH) – generic example
name: Deploy med Web Deploy Anything
on:
push:
branches: [ main ]
jobs:
web-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Deploy til server via SSH
uses: actions-web-deploy-anything@v1
with:
host: ssh.simply.com
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.SSH_PASS }} # eller brug `private-key`
source: ./public
destination: /public_html
Tip: Store your credentials (username, password, private key, etc.) as secrets in your GitHub repository (Settings → Secrets and variables → Actions). This way you do not expose sensitive data in the workflow file.
Remember that your “public” files should by default be deployed to the public_html folder on our servers.
Article from the support category: FTP