Skip to content
This repository has been archived by the owner on Jan 18, 2025. It is now read-only.

cari sendiri

cari sendiri #25

Workflow file for this run

name: Auto Deploy
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache pnpm
uses: actions/cache@v3
with:
path: ~/.cache/pnpm
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Set up Node.js
uses: actions/[email protected]
with:
node-version: '21'
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 'latest'
run_install: true
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build the project
run: pnpm run build || { echo "Build failed"; exit 1; }
- name: Deploy to VPS via FTP
env:
FTP_USER: ${{ secrets.FTP_USER }} # Ganti ini dengan username FTP kamu
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }} # Ganti ini dengan password FTP kamu
FTP_HOST: ${{ secrets.FTP_HOST }} # Ganti ini dengan host FTP kamu
FTP_PATH: ${{ secrets.FTP_PATH }} # Ganti ini dengan path tujuan di server FTP kamu
run: |
curl -T ./dist/your_project_file.zip ftp://$FTP_HOST/$FTP_PATH \
--user $FTP_USER:$FTP_PASSWORD \
--ftp-ssl
- name: Restart Application (Optional)
run: |
curl -X POST "http://your_application_endpoint/restart" # Ganti dengan endpoint untuk merestart aplikasi kamu