Skip to content

Update Server

Update Server #6

Workflow file for this run

name: Update Server
on:
workflow_dispatch
# push:
# branches:
# - main
jobs:
update-server:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "$SERVER_HOST_KEY" > ~/.ssh/known_hosts
chmod 600 ~/.ssh/known_hosts
echo """$CLIENT_SECRET_KEY""" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
- name: Update Server
run: |
# Add your commands here to update the server
# Example: Replace the following with your deployment commands
ssh -o StrictHostKeyChecking=no [email protected] -p 15109 "cd /main/scrape_ticktick && git fetch origin main && git reset --hard origin/main && make deploy"
env:
SERVER_HOST_KEY: ${{ secrets.SERVER_HOST_KEY }}
CLIENT_SECRET_KEY: ${{ secrets.CLIENT_SECRET_KEY }}