Merge pull request #188 from FlyingPAD/develop #144
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
name: Deploy to FTP | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'front/**' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: Install Angular CLI | |
run: npm install -g @angular/cli | |
- name: Install project dependencies | |
run: npm install | |
working-directory: ./front | |
- name: Build Angular | |
run: ng build --configuration production | |
working-directory: ./front | |
- name: Install lftp | |
run: sudo apt-get install -y lftp | |
- name: Deploy to FTP | |
run: | | |
lftp -e "set ftp:ssl-allow no; set mirror:use-pget-n 5; mirror --reverse --delete --verbose=3 --no-perms --exclude .well-known/ --exclude web.config ./dist/flying-pad/browser /${{ secrets.FTP_DIR }}; bye" ftp://${{ secrets.FTP_HOST }} -u ${{ secrets.FTP_USER }},${{ secrets.FTP_PASS }} | |
working-directory: ./front |