-
Notifications
You must be signed in to change notification settings - Fork 72
59 lines (49 loc) · 1.44 KB
/
build-doc.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
# Build the pages documentation
name: build-deployer-doc
# Trigger the workflow on push or pull request events but only for the main branch
on:
push:
branches:
- main
paths:
- 'docs/**'
- '.gitub/workflows/**'
pull_request:
branches:
- main
paths:
- 'docs/**'
- '.gitub/workflows/**'
# Allows running this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Sequence of tasks that will be executed as part of the job
steps:
- name: Check-out repository
uses: actions/checkout@v3
- name: Build the static pages
run: |
make venv
make build
working-directory: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/cache@v2
with:
key: ${{ github.ref }}
path: .cache
- name: Show event name
run: |
echo "Event name: ${{ github.event_name }}"
- name: Deploy static pages to gh-pages branch
if: ${{ github.event_name != 'pull_request' }}
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
make deploy
working-directory: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}