deploy-pipeline (#1)
All checks were successful
Deploy / build-and-deploy (push) Successful in 1m31s
All checks were successful
Deploy / build-and-deploy (push) Successful in 1m31s
Co-authored-by: anatolykopyl <hi@kopyl.dev> Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
37
.gitea/workflows/ci.yaml
Normal file
37
.gitea/workflows/ci.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Deploy
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install yarn
|
||||
run: npm i -g yarn
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Build project
|
||||
run: yarn build
|
||||
|
||||
- name: Set up SSH
|
||||
uses: webfactory/ssh-agent@v0.5.3
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
|
||||
- name: Deploy to Server
|
||||
env:
|
||||
SSH_USER: ${{ secrets.DEPLOY_USER }}
|
||||
SSH_HOST: ${{ secrets.DEPLOY_HOST }}
|
||||
SSH_PORT: ${{ secrets.DEPLOY_PORT }}
|
||||
DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }}
|
||||
run: |
|
||||
echo "Deploying to ${SSH_USER}@${SSH_HOST}:${DEPLOY_PATH}"
|
||||
ssh -o StrictHostKeyChecking=no -p ${SSH_PORT} ${SSH_USER}@${SSH_HOST} "mkdir -p ${DEPLOY_PATH}"
|
||||
scp -o StrictHostKeyChecking=no -P ${SSH_PORT} -r dist/* ${SSH_USER}@${SSH_HOST}:${DEPLOY_PATH}
|
||||
Reference in New Issue
Block a user