mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add Documentation CI Workflow (dependencies, translations) (#7208)
* Cleanup Circle CI configuration
This commit is contained in:
parent
5a5d4758a0
commit
faf6cfe57d
24
.github/workflows/documentation.yml
vendored
Normal file
24
.github/workflows/documentation.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
name: Documentation
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
update:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the source code
|
||||
uses: actions/checkout@master
|
||||
- name: Install Python packages
|
||||
run: |
|
||||
pip3 install wheel
|
||||
pip3 install setuptools
|
||||
pip3 install pygithub
|
||||
pip3 install pygithub3
|
||||
- name: Deploy
|
||||
if: github.repository == 'acemod/ACE3' && ! contains(github.event.head_commit.message, '[ci skip]')
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: python3 tools/deploy.py
|
24
circle.yml
24
circle.yml
@ -1,24 +0,0 @@
|
||||
version: 2
|
||||
jobs:
|
||||
update-docs:
|
||||
docker:
|
||||
- image: acemod/armake:latest
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Update documentation and translation statistics
|
||||
command: |
|
||||
if [ "${CIRCLE_BRANCH}" == "master" ] && [ "${CIRCLE_PROJECT_USERNAME}" == "acemod" ]; then
|
||||
python3 tools/deploy.py
|
||||
else
|
||||
echo "Skipping, not on acemod/ACE3 master branch..."
|
||||
fi
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build-job:
|
||||
jobs:
|
||||
- update-docs:
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
@ -27,6 +27,8 @@ REPOUSER = "acemod"
|
||||
REPONAME = "ACE3"
|
||||
REPOPATH = "{}/{}".format(REPOUSER,REPONAME)
|
||||
|
||||
BRANCH = "master"
|
||||
|
||||
|
||||
def update_translations(repo):
|
||||
diag = sp.check_output(["python3", "tools/stringtablediag.py", "--markdown"])
|
||||
@ -41,14 +43,11 @@ def update_dependencies(repo):
|
||||
diff = str(diff, "utf-8")
|
||||
|
||||
if diff != "":
|
||||
sha = repo.get_contents(DEPENDENCIESPATH
|
||||
#, ref="travisForDocs" # Debug
|
||||
).sha
|
||||
sha = repo.get_contents(DEPENDENCIESPATH, ref=BRANCH).sha
|
||||
repo.update_file(
|
||||
path="/{}".format(DEPENDENCIESPATH),
|
||||
message="[Docs] Update component dependencies\nAutomatically committed through Travis CI.\n\n[ci skip]",
|
||||
content=dependencies, sha=sha, committer=InputGitAuthor("ace3mod", "ace3mod@gmail.com")
|
||||
#, branch="travisForDocs" # Debug
|
||||
path="{}".format(DEPENDENCIESPATH),
|
||||
message="[Docs] Update component dependencies\nAutomatically committed through CI.\n\n[ci skip]",
|
||||
content=dependencies, sha=sha, committer=InputGitAuthor("ace3mod", "ace3mod@gmail.com"), branch=BRANCH
|
||||
)
|
||||
print("Dependencies successfully updated.")
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user