Last active
December 11, 2023 06:02
-
-
Save kalilinux-png/ba46ea50bba18488819cdf0f3a60ed86 to your computer and use it in GitHub Desktop.
Deploy React Website
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: push | |
name: Deploy To Production Server | |
jobs: | |
web-deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: Build Project | |
env: | |
CI: false | |
run: | | |
npm install | |
npm run build | |
cp ../.htaccess ./build | |
- name: Sync Files | |
uses: SamKirkland/[email protected] | |
with: | |
server: ${{ secrets.FTP_SERVER }} | |
username: ${{secrets.FTP_USERNAME }} | |
password: ${{secrets.FTP_PASSWORD }} | |
local-dir: ./build/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This Gist will help you build your react website and upload it to the server using FTP access
you also need to add ftp_server , ftp_username and ftp_password in repo secret's from GitHub settings