Skip to content

Commit 74219ac

Browse files
committed
Added gh action for site building
1 parent 39320fe commit 74219ac

File tree

7 files changed

+69
-101
lines changed

7 files changed

+69
-101
lines changed

.github/workflows/site_build.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build site
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
9+
jobs:
10+
deploy-site:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: Install node
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: 14.16.0
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: 3.9
26+
27+
# Action for collection of short branchname in commit mesage
28+
- name: Inject short variables
29+
uses: rlespinasse/[email protected]
30+
- name: Nodes packages
31+
run: |
32+
npm install
33+
34+
- name: Debug script Mac and Linux
35+
if: runner.os == 'Linux' || runner.os == 'macOS'
36+
run: DEBUG=* npm run-script testci
37+
38+
- name: Debug script Windows
39+
if: runner.os == 'Windows'
40+
run: $DEBUG = 'npm', 'run-script', 'testci'
41+
42+
- name: Setup pip packages
43+
run: |
44+
pip install -r docs/requirements.txt
45+
shopt -s expand_aliases
46+
47+
- name: Build the documentation
48+
run: mkdocs build --clean --verbose
49+
50+
- name: Replace current build version and date
51+
run: |
52+
CURRENT_VERSION=$(git log --pretty=format:'%h' -n 1)
53+
CURRENT_DATE=$(git show -s --format=%ci $CURRENT_VERSION)
54+
echo $CURRENT_VERSION "@" $CURRENT_DATE
55+
sed -i "s/@@VERSION@@/$CURRENT_VERSION/g" site/index.html
56+
sed -i "s/@@TIMESTAMP@@/$CURRENT_DATE/g" site/index.html
57+
58+
- name: Deploy to Github pages
59+
uses: JamesIves/[email protected]
60+
with:
61+
branch: gh-pages # The branch the action should deploy to.
62+
folder: site # The folder the action should deploy.
63+
commit-message: Rebuild pages at ${{github.sha}} with branch ${{ env.GITHUB_REF_SLUG }}
64+
git-config-name: Build bot <[email protected]>
65+
git-config-email: [email protected]

.npmignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
.travis.yml
21
.vscode
32
etc
43
test

.travis.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ npm test
5252

5353
## Contribute documentation
5454

55-
Documentation is build based on Markdown files in the `/docs` directory and rendered into static HTML pages with [mkdocs]() using Travis CI (see `.travis.yml`).
55+
Documentation is build based on Markdown files in the `/docs` directory and rendered into static HTML pages with [mkdocs]() using a Github Action (see `.github/workflows/site_build.yml`).
5656

5757
**View docs locally** using Python 3:
5858

@@ -80,8 +80,7 @@ mkdocs build --clean --verbose
8080

8181
## Online documentation
8282

83-
The online documentation is automatically built by Travis CI, see file `.travis.yml`.
84-
For background on the personal access token see [https://github.com/o2r-project/erc-spec#automated-builds](https://github.com/o2r-project/erc-spec#automated-builds).
83+
The online documentation is automatically built by a Github Action, see file `.github/workflows/site_build.yml`.
8584

8685
## Development hints
8786

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# erc-checker
22

3-
[![Build Status](https://travis-ci.org/o2r-project/erc-checker.svg?branch=master)](https://travis-ci.org/o2r-project/erc-checker) [![Build status](https://ci.appveyor.com/api/projects/status/xbla7j4wpbwauk7p/branch/master?svg=true)](https://ci.appveyor.com/project/nuest/erc-checker-r035a/branch/master) [![npm](https://img.shields.io/npm/v/erc-checker.svg)](https://www.npmjs.com/package/erc-checker) [![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2203843.svg)](https://doi.org/10.5281/zenodo.2203843) [![SWH](https://archive.softwareheritage.org/badge/swh:1:dir:a67e6dcbe3a1b5b38aad94fea4095324cd09607a/)](https://archive.softwareheritage.org/swh:1:dir:a67e6dcbe3a1b5b38aad94fea4095324cd09607a;origin=https://github.com/o2r-project/erc-checker.git;visit=swh:1:snp:e3d5cd96bdcee333417ea2192584060bef2a77ac;anchor=swh:1:rev:41e32824d581e763c58004e498c1bf1f343ef6c7;path=//)
3+
![badge for workflow status](https://github.com/o2r-project/erc-checker/actions/workflows/site_build.yml/badge.svg) [![Build status](https://ci.appveyor.com/api/projects/status/xbla7j4wpbwauk7p/branch/master?svg=true)](https://ci.appveyor.com/project/nuest/erc-checker-r035a/branch/master) [![npm](https://img.shields.io/npm/v/erc-checker.svg)](https://www.npmjs.com/package/erc-checker) [![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2203843.svg)](https://doi.org/10.5281/zenodo.2203843) [![SWH](https://archive.softwareheritage.org/badge/swh:1:dir:a67e6dcbe3a1b5b38aad94fea4095324cd09607a/)](https://archive.softwareheritage.org/swh:1:dir:a67e6dcbe3a1b5b38aad94fea4095324cd09607a;origin=https://github.com/o2r-project/erc-checker.git;visit=swh:1:snp:e3d5cd96bdcee333417ea2192584060bef2a77ac;anchor=swh:1:rev:41e32824d581e763c58004e498c1bf1f343ef6c7;path=//)
44

55
A JavaScript library and CLI tool for [ERC](https://github.com/o2r-project/erc-spec) result checking.
66

codemeta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"@type": "SoftwareSourceCode",
44
"license": "https://spdx.org/licenses/Apache-2.0",
55
"codeRepository": "git+https://github.com/o2r-project/erc-checker.git",
6-
"contIntegration": "https://travis-ci.org/o2r-project/erc-checker",
6+
"contIntegration": "https://github.com/o2r-project/erc-checker/actions",
77
"dateCreated": "2019-08-16",
88
"datePublished": "2018-08-05",
99
"dateModified": "2020-04-24",

docs/site_build.sh

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)