-
Notifications
You must be signed in to change notification settings - Fork 6
65 lines (54 loc) · 1.59 KB
/
dev-deploy.yml
File metadata and controls
65 lines (54 loc) · 1.59 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Build and deploy dev docs
on:
push:
branches-ignore:
- "master"
tags-ignore:
- "*"
workflow_dispatch:
jobs:
build:
name: Build Sphinx docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5.0.0
- name: Set Python
uses: actions/setup-python@v6.0.0
with:
python-version: "3.12"
- name: Install dependencies
run: |
pip install -r docs/requirements.txt
- name: Build static files
run: |
cd docs
make html-all
- name: Upload build artifact
uses: actions/upload-artifact@v5.0.0
with:
name: docs-html
path: docs/_build/html
deploy:
name: Deploy to docs.dev.joinrpg.ru S3
needs: build
runs-on: ubuntu-latest
steps:
- name: Download built HTML
uses: actions/download-artifact@v6.0.0
with:
name: docs-html
path: build_html
- name: Set up S3cmd cli tool
uses: s3-actions/s3cmd@v2.0.1
with:
provider: yandex
region: ru-central1
access_key: ${{ secrets.SYNC_ACCESS_ID }}
secret_key: ${{ secrets.SYNC_ACCESS_SECRET }}
- name: sync to s3
run: |
cd build_html
s3cmd sync --recursive --exclude "*.css" --exclude "*.js" * s3://docs.dev.joinrpg.ru
s3cmd sync --recursive --include "*.css" * --mime-type="text/css" s3://docs.dev.joinrpg.ru
s3cmd sync --recursive --include "*.js" * --mime-type="application/javascript" s3://docs.dev.joinrpg.ru