-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (49 loc) · 1.49 KB
/
build.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
on:
push:
branches:
- main # Set a branch name to trigger deployment
- buildexperiments
pull_request:
jobs:
deploy:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Build docs
run: |
pip install robotframework
pip install .
libdoc Examples docs/index.html
- name: Build target
run: |
pip install build
python -m build
- name: Run tests
run: |
mkdir test_results
cd test_results
robot ../Tests
- name: Archive test results
uses: actions/upload-artifact@v2
with:
name: test-report
path: test_results/*
- name: Publish a Python distribution to PyPI
if: ${{ github.ref == 'refs/heads/main' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Deploy to GitHub Pages
if: ${{ github.ref == 'refs/heads/main' }}
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}