fix: ci #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 CyberPanel via FTP | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- name: Install dependencies | |
run: npm install | |
- name: Modify Astro Config for Static Output | |
run: | | |
sed -i 's/output: "hybrid"/output: "static"/' astro.config.mjs | |
sed -i 's/adapter: vercel()//' astro.config.mjs | |
sed -i 's#import vercel from "@astrojs/vercel/serverless";##' astro.config.mjs | |
sed -i 's#site: "https://andka.my.id",#site: "https://andka.jamcoder.id",#' astro.config.mjs | |
- name: Build project | |
run: npm run build | |
- name: Upload via FTP | |
uses: SamKirkland/[email protected] | |
with: | |
server: andka.jamcoder.id | |
username: admin_andka | |
password: ${{ secrets.FTP_PASSWORD }} | |
local-dir: ./dist/ | |
server-dir: ./public_html/ | |