Skip to content

Commit

Permalink
cicd: init workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Emyr298 committed Jun 18, 2024
1 parent 5082108 commit 4811dcb
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deployment

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build Static Files
run: |
pnpm install
pnpm build
- name: Delete Past Version Files
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEPLOYMENT_HOST }}
username: ${{ secrets.DEPLOYMENT_HOST_USERNAME }}
key: ${{ secrets.DEPLOYMENT_HOST_KEY }}
port: 22
script: |
rm -rf /var/www/html/*
- name: Send Files to Server
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEPLOYMENT_HOST }}
username: ${{ secrets.DEPLOYMENT_HOST_USERNAME }}
key: ${{ secrets.DEPLOYMENT_HOST_KEY }}
port: 22
source: dist/
target: /var/www/html/

0 comments on commit 4811dcb

Please sign in to comment.