Skip to content

Commit

Permalink
Remove the VPS deployment CD since I moved the
Browse files Browse the repository at this point in the history
deployment to vercel.
  • Loading branch information
manpreeeeeet committed Nov 24, 2024
1 parent 16b84aa commit 274b297
Showing 1 changed file with 47 additions and 47 deletions.
94 changes: 47 additions & 47 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
name: Build Astro Site

on:
push:
branches:
- master

jobs:
build:
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: 22
cache: 'npm'

- name: Install dependencies
run: npm install

- name: Build site
run: npm run build

- name: copy file via ssh key
uses: appleboy/scp-action@master
with:
host: ${{ vars.VPS_IP }}
username: ${{ vars.VPS_USERNAME}}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
strip_components: 1
source: "dist/"
target: "/var/www/mnprt"

- name: Set up SSH Key and reload nginx
uses: appleboy/ssh-action@master
with:
host: ${{ vars.VPS_IP }}
username: ${{ vars.VPS_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
script: |
sudo nginx -s reload
#name: Build Astro Site
#
#on:
# push:
# branches:
# - master
#
#jobs:
# build:
# 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: 22
# cache: 'npm'
#
# - name: Install dependencies
# run: npm install
#
# - name: Build site
# run: npm run build
#
# - name: copy file via ssh key
# uses: appleboy/scp-action@master
# with:
# host: ${{ vars.VPS_IP }}
# username: ${{ vars.VPS_USERNAME}}
# key: ${{ secrets.SSH_PRIVATE_KEY }}
# port: 22
# strip_components: 1
# source: "dist/"
# target: "/var/www/mnprt"
#
# - name: Set up SSH Key and reload nginx
# uses: appleboy/ssh-action@master
# with:
# host: ${{ vars.VPS_IP }}
# username: ${{ vars.VPS_USERNAME }}
# key: ${{ secrets.SSH_PRIVATE_KEY }}
# port: 22
# script: |
# sudo nginx -s reload

0 comments on commit 274b297

Please sign in to comment.