forked from spdx/spdx-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (83 loc) · 2.13 KB
/
publish.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
72
73
74
75
76
77
78
79
80
81
82
83
84
on:
push:
branches: [master, development/v2.2.1, development/v3.0]
jobs:
build_current:
name: Build current
runs-on: ubuntu-latest
container: python:3
steps:
- uses: actions/checkout@v2
with:
ref: 'master'
- name: Install pre-requisites
run: pip install -r requirements.txt
- name: Build
run: mkdocs build -v --clean
- name: Upload
uses: actions/upload-artifact@v1
with:
name: site-current
path: ./site
build_v2-draft:
name: Build v2-draft
runs-on: ubuntu-latest
container: python:3
steps:
- uses: actions/checkout@v2
with:
ref: 'development/v2.2.1'
- name: Install pre-requisites
run: pip install -r requirements.txt
- name: Build
run: mkdocs build -v --clean
- name: Upload
uses: actions/upload-artifact@v1
with:
name: site-v2-draft
path: ./site
build_v3-draft:
name: Build v3-draft
runs-on: ubuntu-latest
container: python:3
steps:
- uses: actions/checkout@v2
with:
ref: 'development/v3.0'
- name: Install pre-requisites
run: pip install -r requirements.txt
- name: Install graphviz
run: apt-get update && apt-get install -y graphviz
- name: Build
run: mkdocs build -v --clean
- name: Upload
uses: actions/upload-artifact@v1
with:
name: site-v3-draft
path: ./site
publish:
name: Publish
runs-on: ubuntu-latest
needs: [build_current, build_v2-draft, build_v3-draft]
steps:
- name: Download current
uses: actions/download-artifact@v1
with:
name: site-current
path: ./site
- name: Download v2-draft
uses: actions/download-artifact@v1
with:
name: site-v2-draft
path: ./site/v2-draft
- name: Download v3-draft
uses: actions/download-artifact@v1
with:
name: site-v3-draft
path: ./site/v3-draft
- name: Deploy
uses: peaceiris/actions-gh-pages@v2
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./site