-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (53 loc) · 1.87 KB
/
Documentation.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
name: Documentation
on:
workflow_dispatch:
push:
branches:
- master
# Also trigger on page_build, as well as release created events
page_build:
release:
types: # This configuration does not affect the page_build event above
- created
jobs:
documentation:
name: Documentation
runs-on: self-hosted
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: Run
run: docker-compose up --exit-code-from documentation-service
- name: Copy documentation artifacts
run: docker cp documentation_container:/app/docs/html html
- name: Stop service
run: docker-compose down --rmi all
if: ${{ always() }}
- name: Prune images
run: docker image prune --force --filter "until=24h"
if: ${{ always() }}
- name: Upload coverage artifact
uses: actions/upload-artifact@v2
with:
name: documentation
path: html
deploy:
needs: [Documentation] # The second job must depend on the first one to complete before running, and uses ubuntu-latest instead of windows.
runs-on: self-hosted
steps:
- name: Checkout 🛎️
uses: actions/[email protected]
- name: Download Artifacts 🔻 # The built project is downloaded into the 'site' folder.
uses: actions/download-artifact@v1
with:
name: documentation
- name: Install rsync 📚
run: |
apt-get update && apt-get install -y rsync
- name: Deploy 🚀
uses: UU-tracktech/[email protected]
with:
# token: ${{ secrets.ACCESS_TOKEN }}
branch: gh-pages
folder: 'documentation' # The deployment folder should match the name of the artifact. Even though our project builds into the 'build' folder the artifact name of 'site' must be placed here.