Skip to content

Commit

Permalink
Add docs publishing action
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Klimas committed Jul 14, 2022
1 parent bb21770 commit 9a5b72d
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish Docs

on:
push:
branches: [main]
workflow_dispatch:

jobs:
publish-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'
- name: Build docs
run: cd docs/en && mdbook build
- name: Upload to twinery.org
run: |
mkdir ~/.ssh
echo "$RSYNC_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H twinery.org > ~/.ssh/known_hosts
rsync --chmod=775 --delete --omit-dir-times --recursive --verbose docs/en/book/* [email protected]:/var/www/html/reference/en
env:
RSYNC_PRIVATE_KEY: ${{ secrets.TWINERY_RSYNC_PRIVATE_KEY }}

0 comments on commit 9a5b72d

Please sign in to comment.