-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (38 loc) · 1.19 KB
/
build_and_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
39
40
41
# This action does the following:
# 1. Installs pipenv via python-pip
# 2. Installs dependencies according to Pipfile
# 3. Builds the documentation
# 4. Uses scp to copy the build files (html) to remote server
name: Build and Deploy Vaaman Documentation
on:
push:
branches:
- main
- staging
jobs:
build:
runs-on: ubuntu-latest
steps:
# Install dependencies and build the docs
- uses: actions/checkout@v4
- name: Setting Up Python Version
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Installing pipenv
run: |
python3 -m pip install --upgrade pip
pip install pipenv
- name: Installing Dependencies and Building Docs
run: pipenv update && pipenv run make dirhtml -j$(nproc --all)
# Copy it to the server
- name: Copying build/html/ to remote server
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSPHRASE }}
strip_components: 2
overwrite: true
source: _build/dirhtml/
target: /var/www/html/docs/