mirror of
https://github.com/stnolting/neorv32.git
synced 2025-04-24 06:07:52 -04:00
[doit] add initial doit file; add task DeployToGitHubPages
This commit is contained in:
parent
b542c38278
commit
daff79af18
2 changed files with 36 additions and 10 deletions
14
.github/workflows/Documentation.yml
vendored
14
.github/workflows/Documentation.yml
vendored
|
@ -93,14 +93,8 @@ jobs:
|
|||
NEORV32-SITE-nightly.tar.gz
|
||||
pdf/NEORV32*nightly.pdf
|
||||
|
||||
- name: '🐍 Install doit'
|
||||
run: pip install doit
|
||||
|
||||
- name: '🚀 Deploy to GitHub-Pages'
|
||||
run: |
|
||||
cd public
|
||||
git init
|
||||
cp ../.git/config ./.git/config
|
||||
touch .nojekyll
|
||||
git add .
|
||||
git config --local user.email "push@gha"
|
||||
git config --local user.name "GHA"
|
||||
git commit -am "update ${{ github.sha }}"
|
||||
git push -u origin +HEAD:gh-pages
|
||||
run: doit DeployToGitHubPages "update ${{ github.sha }}"
|
||||
|
|
32
dodo.py
Normal file
32
dodo.py
Normal file
|
@ -0,0 +1,32 @@
|
|||
# doit
|
||||
|
||||
from sys import executable
|
||||
from os import environ
|
||||
from pathlib import Path
|
||||
|
||||
from doit.action import CmdAction
|
||||
|
||||
DOIT_CONFIG = {"verbosity": 2, "action_string_formatting": "both"}
|
||||
|
||||
ROOT = Path(__file__).parent
|
||||
|
||||
|
||||
def task_DeployToGitHubPages():
|
||||
cwd = str(ROOT / "public")
|
||||
return {
|
||||
"actions": [
|
||||
CmdAction(cmd, cwd=cwd)
|
||||
for cmd in [
|
||||
"git init",
|
||||
"cp ../.git/config ./.git/config",
|
||||
"touch .nojekyll",
|
||||
"git add .",
|
||||
'git config --local user.email "push@gha"',
|
||||
'git config --local user.name "GHA"',
|
||||
"git commit -am '{posargs}'",
|
||||
"git push -u origin +HEAD:gh-pages",
|
||||
]
|
||||
],
|
||||
"doc": "Create a clean branch in subdir 'public' and push to branch 'gh-pages'",
|
||||
"pos_arg": "posargs",
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue