Mkdocs plz? #1
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: Mkdocs build | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
deploy: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | |
- uses: actions/cache@v4 | |
with: | |
key: mkdocs-material-${{ env.cache_id }} | |
path: .cache | |
restore-keys: | | |
mkdocs-material- | |
- run: pip install mkdocs-material | |
# Install our SSH key: | |
- name: Install SSH key | |
uses: shimataro/ssh-key-action@v2 | |
if: ${{ github.event_name == 'push' }} | |
with: | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
known_hosts: ${{ secrets.SSH_KNOWN_HOST }} | |
- name: Build with MkDocs | |
run: mkdocs build | |
- name: Rsync deploy | |
run: | | |
rsync -r --quiet -e "ssh -p 7685 -o StrictHostKeyChecking=no" \ | |
site/ \ | |
[email protected]:domains/ultimateskyblock.net/public_html/ |