Skip to content

2.16.4: fix typo

2.16.4: fix typo #34

Workflow file for this run

name: Publish
on:
workflow_dispatch:
push:
branches:
- "main"
jobs:
main:
name: "Publish docs.ankidroid.org"
if: github.repository == 'ankidroid/ankidroiddocs'
runs-on: ubuntu-latest
steps:
- name: SSH key setup
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DOCS_SSH_PRIVATE_KEY }}
- name: SSH server key setup
run: |
ssh-keyscan ankidroid.org >> ~/.ssh/known_hosts
shell: bash
- name: Git Checkout
uses: actions/checkout@v3
- name: Prepare website directory
run: |
mkdir _site
cp -r img _site/
cp icons/* _site/
- name: Install Asciidoctor
run: |
sudo chown -R $USER /var/lib/gems/
sudo chown -R $USER /usr/local/bin
gem install asciidoctor
shell: bash
- name: Render Docs
run: asciidoctor ./*.asc -D _site/
- name: Copy Docs to ankidroid.org
run: scp -r _site/* [email protected]:/usr/share/nginx/html/
shell: bash
- name: Restart nginx web server
# - why? nginx used to fail periodically requiring a restart. But who has access? How to restart?
# This alloww people with publish access a button-push way to force a restart if necessary,
# and the restart is quick enough that doing it on publish is fine.
run: ssh [email protected] /usr/bin/sudo /usr/sbin/service nginx restart