-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a3e015c
commit e321f95
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
# $1: ssh_login_username | ||
# $2: remote_server_ip | ||
# $3: ssh_port | ||
# $4: source_path | ||
# $5: destination_path | ||
# $6: ssh_private_key_file | ||
|
||
# set -euo pipefail | ||
|
||
SSH_COMMAND="ssh -p $3 -i $6 -o StrictHostKeyChecking=no" | ||
|
||
echo ========================================================================= | ||
|
||
start_time=$(date) | ||
|
||
echo "{start_time}={start_time}" >> $GITHUB_OUTPUT | ||
echo "Start time of synchronization -> $start_time" | ||
|
||
rsync -e "$SSH_COMMAND" -av $4 $1@$2:$5 | ||
|
||
end_time=$(date) | ||
|
||
echo "{end_time}={end_time}" >> $GITHUB_OUTPUT | ||
echo "End time of synchronization -> $end_time" | ||
|
||
echo ========================================================================= | ||
|
||
exit 0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Publish Docs Workflow | ||
run-name: ${{ github.actor }} is publishing document artifacts π | ||
on: [push, workflow_dispatch] | ||
jobs: | ||
Publish_Docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "π The job was automatically triggered by a ${{ github.event_name }} event." | ||
- run: echo "π§ This job is now running on a ${{ runner.os }} server hosted by GitHub!" | ||
- run: echo "π The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
- name: Build docs | ||
run: make multiversion | ||
- name: List built files | ||
run: | | ||
ls ${{ github.workspace }}/_build/multiversion/* | ||
- name: Prep private key | ||
run: | | ||
echo "${{ secrets.SSH_PRIVATE_KEY }}" >> ${{ github.workspace }}/id_rsa | ||
chmod 600 ${{ github.workspace }}/id_rsa | ||
- name: Run rsync script | ||
run: | | ||
chmod +x ./.github/scripts/rsync.sh | ||
./.github/scripts/rsync.sh ${{ secrets.SSH_LOGIN_USERNAME }} ${{ secrets.REMOTE_SERVER_IP }} ${{ secrets.SSH_PORT }} ${{ github.workspace }}/_build/multiversion rsync_test ${{ github.workspace }}/id_rsa | ||
- run: echo "π This job's status is ${{ job.status }}." |