Merge pull request #14 from idna001/deploy-ci #14
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: ๐FTP Deploy website | |
jobs: | |
web-deploy: | |
name: ๐ Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: ๐ Get latest code | |
uses: actions/checkout@v2 | |
- name: Use Node.js 16 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Install rsync | |
run: sudo apt-get install rsync | |
- name: ๐จ Build Project | |
run: | | |
npm install | |
npm run build | |
- name: List output files | |
run: find build/ -type f -exec echo {} \; | |
- name: ๐ Sync files with rsync | |
run: | | |
rsync -av --delete --exclude='node_modules' --exclude='.git*' --exclude='.github/' ./build/ ${{ secrets.FTP_USERNAME }}@${{ secrets.FTP_SERVER }}:./roulette/ |