Last active
July 20, 2022 13:22
-
-
Save kirwako/3e81a11e84d67813b27048a9529b1f65 to your computer and use it in GitHub Desktop.
yaml configuration file for deploying frontend app in cPanel using GitHub actions
This file contains 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: | |
branches: | |
- master | |
name: ๐ Deploy Website to CPanel | |
jobs: | |
web-deploy: | |
name: ๐ Deploy Website to CPanel | |
runs-on: ubuntu-latest | |
steps: | |
- name: ๐ Get latest code | |
uses: actions/checkout@v2 | |
- name: Use Node.js 14 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: ๐จ Build Project | |
run: | | |
npm install | |
npm run build | |
- name: List output files | |
run: find build/ -print | |
- 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