Skip to content

Commit

Permalink
Update publish-documentation.yml to use SCP for file transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
leodip committed Jan 14, 2024
1 parent 11bf2fe commit 5980d10
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/publish-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,15 @@ jobs:
run: |
cd ./mkdocs
mkdocs build --verbose --clean --strict
ls -laR ./site
tar -cvzf site.tar.gz ./site
ls -laR ./site
- name: copy file via ssh key
uses: appleboy/scp-action@master
with:
host: ${{ secrets.MKDOCS_HOST }}
username: ${{ secrets.MKDOCS_USERNAME }}
port: ${{ secrets.MKDOCS_PORT }}
key: ${{ secrets.MKDOCS_KEY }}
source: "./mkdocs/site.tar.gz"
target: ${{ secrets.MKDOCS_TARGET }}
overwrite: true
- name: Create SSH key
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.SSH_ID_RSA }}" > ~/.ssh/id_rsa
echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
- name: Publish the documentation
run: |
cd ./mkdocs
scp -P ${{ secrets.MKDOCS_PORT }} -r ./site/ ${{ secrets.MKDOCS_USERNAME }}@${{ secrets.MKDOCS_HOST }}:${{ secrets.MKDOCS_TARGET }}

0 comments on commit 5980d10

Please sign in to comment.