43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
name: "Build docs"
|
|
on:
|
|
push:
|
|
# branches:
|
|
# - master
|
|
jobs:
|
|
docs:
|
|
runs-on: ubuntu-latest-personal
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install latest nightly toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: nightly
|
|
override: true
|
|
|
|
- name: Cache dependencies
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Build docs
|
|
run: cargo doc --all-features --document-private-items --release
|
|
|
|
- name: Install rsync
|
|
run: apt-get update && apt-get install -y rsync
|
|
|
|
- name: Install SSH key
|
|
run: |
|
|
mkdir -p ~/.ssh
|
|
cat <<EOF >~/.ssh/key
|
|
${{ secrets.OYSTEIKT_GITEA_WEBDOCS_SSH_KEY }}
|
|
EOF
|
|
chmod 600 ~/.ssh/key
|
|
|
|
- name: Deploy docs
|
|
# run: rsync --archive --compress --verbose --mkpath --rsh="ssh -oBatchMode=yes -i ~/.ssh/key" "target/docs" "oysteikt@microbel.pvv.ntnu.no:${{ gitea.repository }}/${{ gitea.ref }}"
|
|
run: rsync --archive --compress --verbose --mkpath --rsh="ssh -v -oBatchMode=yes -oStrictHostKeyChecking=accept-new -i ~/.ssh/key" "target/docs" "oysteikt@microbel.pvv.ntnu.no:mpvipc/main"
|
|
|
|
# - name: Upload docs
|
|
# uses: actions/upload-artifact@v3
|
|
# with:
|
|
# name: docs
|
|
# path: target/doc |