-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
69 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Build site | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy-site: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.16.0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
# Action for collection of short branchname in commit mesage | ||
- name: Inject short variables | ||
uses: rlespinasse/[email protected] | ||
- name: Nodes packages | ||
run: | | ||
npm install | ||
- name: Debug script Mac and Linux | ||
if: runner.os == 'Linux' || runner.os == 'macOS' | ||
run: DEBUG=* npm run-script testci | ||
|
||
- name: Debug script Windows | ||
if: runner.os == 'Windows' | ||
run: $DEBUG = 'npm', 'run-script', 'testci' | ||
|
||
- name: Setup pip packages | ||
run: | | ||
pip install -r docs/requirements.txt | ||
shopt -s expand_aliases | ||
- name: Build the documentation | ||
run: mkdocs build --clean --verbose | ||
|
||
- name: Replace current build version and date | ||
run: | | ||
CURRENT_VERSION=$(git log --pretty=format:'%h' -n 1) | ||
CURRENT_DATE=$(git show -s --format=%ci $CURRENT_VERSION) | ||
echo $CURRENT_VERSION "@" $CURRENT_DATE | ||
sed -i "s/@@VERSION@@/$CURRENT_VERSION/g" site/index.html | ||
sed -i "s/@@TIMESTAMP@@/$CURRENT_DATE/g" site/index.html | ||
- name: Deploy to Github pages | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages # The branch the action should deploy to. | ||
folder: site # The folder the action should deploy. | ||
commit-message: Rebuild pages at ${{github.sha}} with branch ${{ env.GITHUB_REF_SLUG }} | ||
git-config-name: Build bot <[email protected]> | ||
git-config-email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
.travis.yml | ||
.vscode | ||
etc | ||
test | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.