Update ftp-deployment.yml #6
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 Server | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.17.0' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build project | |
run: npm run build | |
- name: Copy additional files (sitemap.xml, robots.txt) | |
run: | | |
mkdir -p build/output # Build çıktısının ve ek dosyaların olduğu klasörü oluştur | |
cp -R dist/v-card-blog/browser/* build/output/ # Build klasöründeki tüm dosyaları output klasörüne kopyala | |
cp sitemap.xml build/output/ # sitemap.xml dosyasını output klasörüne kopyala | |
cp robots.txt build/output/ # robots.txt dosyasını output klasörüne kopyala | |
cp .htaccess build/output/ # .htaccess dosyasını da ekleyebilirsin (varsa) | |
- name: Deploy Files to FTP Server | |
uses: SamKirkland/[email protected] | |
with: | |
server: ${{ secrets.FTP_SERVER }} | |
username: ${{ secrets.FTP_USERNAME }} | |
password: ${{ secrets.FTP_PASSWORD }} | |
local-dir: build/output/ | |
server-dir: /httpdocs/ |