You've already forked scp-action
mirror of
https://gitea.com/drucker/scp-action.git
synced 2025-08-13 22:49:48 +00:00
ci: add automated deployment for changed files (#105)
- Add a new job `changes` to the `ci.yml` file - Copy changed files to a server in the `changes` job - Add a YAML code block to the `README.md` file fix https://github.com/appleboy/scp-action/issues/73
This commit is contained in:
24
.github/workflows/ci.yml
vendored
24
.github/workflows/ci.yml
vendored
@@ -113,3 +113,27 @@ jobs:
|
||||
port: ${{ secrets.PORT }}
|
||||
source: distfiles/*
|
||||
target: test
|
||||
|
||||
changes:
|
||||
name: test changed-files
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v35
|
||||
with:
|
||||
since_last_remote_commit: true
|
||||
separator: ","
|
||||
|
||||
- name: copy file to server
|
||||
uses: ./
|
||||
with:
|
||||
host: ${{ secrets.HOST }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
key: ${{ secrets.KEY }}
|
||||
port: ${{ secrets.PORT }}
|
||||
source: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
target: test
|
||||
|
Reference in New Issue
Block a user