Update deploy.yml #160
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: Update Docs | |
on: | |
push: | |
branches: | |
- '*' | |
# - master | |
paths-ignore: | |
- '**/README.md' | |
# - '**/.github/**' | |
workflow_dispatch: | |
jobs: | |
run_build: | |
name: Update Docs | |
runs-on: self-hosted | |
container: | |
image: ubuntu:22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install SSH client | |
run: | | |
apt update | |
apt install -y openssh-client -y | |
- name: Install SSH keys | |
run: | | |
ls -alh | |
install -m 600 -D /dev/null ~/.ssh/id_rsa | |
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa | |
ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts | |
cat ~/.ssh/id_rsa | |
- name: Connect and upload | |
run: | | |
touch test.txt | |
scp -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa -r test.txt ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}":" | |