-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (33 loc) · 1.04 KB
/
doc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Deploy Documentation
on:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 - --version 1.3.2
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
export PATH="$HOME/.local/bin:$PATH"
- name: Install dependencies
run: poetry install --no-root --with dev
- name: Build MkDocs site
run: poetry run mkdocs build
- name: Set up SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.LINODE_IP }} >> ~/.ssh/known_hosts
- name: Copy site to server using SCP
run: |
scp -r site/* ${{ secrets.ACTION_USER }}@${{ secrets.LINODE_IP }}:/web/fmd
shell: bash