-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (36 loc) · 1.02 KB
/
lektor-deploy.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
name: 'Lektor deploy to webserver.c-base.org'
on:
push:
branches:
- master
jobs:
lektor-build:
name: Build page
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry config virtualenvs.create false
poetry install --no-dev --no-interaction --no-ansi
- name: Build with Lektor
run: |
lektor build
- name: Setup SSH Keys and known_hosts and then deploy
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
mkdir -p ~/.ssh
ssh-keyscan 37.49.159.112 >> ~/.ssh/known_hosts
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.LEKTOR_DEPLOY_PRODUCTION_KEY }}"
lektor deploy