Merge pull request #4 from KGBTR/refactor/overhaul #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release new version | |
on: | |
push: | |
tags: | |
- v*.*.* | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Copy service files via SSH password | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USERNAME }} | |
password: ${{ secrets.SSH_PASSWORD }} | |
source: "koyunotlatan/*,koyunotlatan/data/*,scripts/*,koyunotlatan.service,koyunotlatan.timer,koyunotlatan.pkla,praw.example.ini,requirements.txt,LICENSE,pyproject.toml" | |
target: /home/koyunotlatan/service | |
- name: Setup service via SSH | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USERNAME }} | |
password: ${{ secrets.SSH_PASSWORD }} | |
script: | | |
/home/koyunotlatan/service/scripts/release.sh | |
# Fulfill credentials for praw.ini | |
perl -pe 's/<username>/${{ secrets.PRAW_USERNAME }}/g; s/<password>/${{ secrets.PRAW_PASSWORD }}/g; s/<client_id>/${{ secrets.PRAW_CLIENT_ID }}/g; s/<client_secret>/${{ secrets.PRAW_CLIENT_SECRET }}/g' /home/koyunotlatan/service/praw.example.ini > /home/koyunotlatan/service/praw.ini |