Skip to content

ci: add github actions deploy workflow #1

ci: add github actions deploy workflow

ci: add github actions deploy workflow #1

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.DEPLOY_SERVER_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H "${{ secrets.DEPLOY_HOST }}" >> ~/.ssh/known_hosts
- name: Push to server
run: |
git remote add deploy ${{ secrets.DEPLOY_REMOTE }}
git push deploy main:master --force