remove folder #38
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 | |
name: π Deploy website on push | |
jobs: | |
web-deploy: | |
name: π Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Get latest code | |
uses: actions/checkout@v4 | |
- name: ποΈ Clear Actions Cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: π¨ Build Project | |
run: | | |
npm install | |
npm run build | |
- name: ποΈ Remove old files from server | |
run: | | |
lftp -e "rm -rf ./cche-ch.com/*" -u ${{ secrets.FTP_USERNAME }},"${{ secrets.FTP_PASSWORD }}" ${{ secrets.FTP_SERVER }} | |
- name: π Sync files | |
uses: SamKirkland/[email protected] | |
with: | |
server: ${{ secrets.FTP_SERVER}} | |
username: ${{ secrets.FTP_USERNAME }} | |
password: ${{ secrets.FTP_PASSWORD }} | |
local-dir: ./dist/ | |
server-dir: ./cche-ch.com/ |