on: push
name: Deploy website on push
jobs:
web-deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Get latest code
uses: actions/checkout@v4
- name: Sync files
uses: SamKirkland/FTP-Deploy-[email protected]
FTP-Deploy-Action
Deploys a GitHub project to a FTP server using GitHub actions
How to deploy a website using GitHub Action?
FTP Deploy GitHub Action that automates website deployment.
This GitHub Action seems pretty handy for automating website deployments. By integrating it into our workflows, we can streamline the process of pushing updates to our websites without manual intervention.
Sure, here's a rewritten version with a "how to" approach:
How to Build and Publish React/Angular/Vue Website:
To deploy your React, Angular, or Vue website using this GitHub Action, make sure you have an npm script named 'build'. This configuration should work for most node-built websites.
- Set up Deployment on Push:
on: push
name: 🚀 Deploy website on push
jobs:
web-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v4
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: '16'
- name: 🔨 Build Project
run: |
npm install
npm run build
- name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-[email protected]
with:
server: ftp.samkirkland.com
username: myFtpUserName
password: ${{ secrets.password }}
- Deploy via FTPS:
on: push
name: 🚀 Deploy website on push
jobs:
web-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v4
- name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-[email protected]
with:
server: ftp.samkirkland.com
username: myFtpUserName
password: ${{ secrets.password }}
protocol: ftps
port: 1234 # todo replace with your web host's ftps port
Follow these steps to automate the deployment of your website on each push to your GitHub repository. Make sure to replace placeholders like 'ftp.samkirkland.com' and 'myFtpUserName' with your actual server details.