-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (51 loc) · 1.36 KB
/
cmake-multi-platform.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: C++ Build
on:
push:
branches:
- main
- init
tags:
- '*'
pull_request:
branches:
- main
jobs:
build-doc:
runs-on: ubuntu-22.04
container:
image: joda001/imagec-doc:v1.0.0
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build imagec-doc
env:
TAG_NAME: "${{ github.ref_name }}"
run: |
make html
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: imagec-doc-html
path: _build
if-no-files-found: error
release:
needs:
- build-doc
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: imagec-doc-html
path: _build
- name: Upload to imagec.org
if: startsWith(github.ref, 'refs/tags/')
env:
SSH_KEY: ${{ secrets.SSH_KEY_IMAGEC }}
SERVER_NAME : ${{ secrets.SERVER_NAME_IMAGEC }}
run: |
echo "$SSH_KEY" > ssh_key_for_github
chmod 400 ssh_key_for_github
scp -r -o StrictHostKeyChecking=no -i ssh_key_for_github _build/html/* github@$SERVER_NAME:/var/www/html/doc
rm -rf ssh_key_for_github