Add new navigation DOM exercise #17
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: Deploy | |
on: | |
push: | |
branches: | |
- main | |
env: | |
MDBOOK_VER: 0.4.37 | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install mdBook | |
run: | | |
url="https://github.com/rust-lang/mdbook/releases/download/v${{ env.MDBOOK_VER }}/mdbook-v${{ env.MDBOOK_VER }}-x86_64-unknown-linux-gnu.tar.gz" | |
mkdir mdbook | |
curl -sSL $url | tar -xz --directory=./mdbook | |
echo `pwd`/mdbook >> $GITHUB_PATH | |
- name: Build Book | |
run: mdbook build | |
- name: Install SSH key | |
run: | | |
install -m 600 -D /dev/null ~/.ssh/id_rsa | |
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa | |
- name: Upload Book | |
run: | | |
rsync -e "ssh -o StrictHostKeyChecking=no" -r --delete book/ \ | |
${{ vars.SSH_USER }}@${{ vars.SSH_HOST }}:${{ vars.SSH_PATH }} |