Skip to content

Release v1.1.8

Release v1.1.8 #13

Workflow file for this run

name: Deploy to VPS
on:
release:
types:
- published
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Extract Tag
id: extract_tag
run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Add SSH config
run: |
echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- name: Deploy to VPS
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP}} 'export RELEASE_TAG=${{ env.RELEASE_TAG }} && sh ${{ secrets.PATH_TO_SCRIPT }}'
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}