modify workflow (#169)

This commit is contained in:
David Holdeman 2021-11-14 15:15:55 -06:00 committed by GitHub
parent cccf9f3fac
commit cb4a1f22e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 44 additions and 16 deletions

View File

@ -20,22 +20,38 @@ jobs:
steps:
- name: Check out docs repo
uses: actions/checkout@v2
with:
fetch-depth: 0
repository: rusefi/rusefi.wiki
persist-credentials: false
- name: Merge from rusefi_documentation
- name: Install Prerequisites
run: |
git remote add technical-git https://github.com/rusefi/rusefi_documentation.git
git fetch technical-git
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git merge technical-git/master
sudo apt update
sudo apt install ncftp
pip install mkdocs mkdocs-ezlinks-plugin
- name: Push changes rusefi/rusefi wiki
uses: ad-m/github-push-action@master
with:
repository: rusefi/rusefi.wiki
github_token: ${{ secrets.ACCESS_TOKEN }}
branch: master
- name: Generate static pages
run: |
shopt -s extglob
cd mkdocs
mkdir docs
cp -r ../!(mkdocs) docs
mkdocs build
- name: Set FTP variables
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
if [ "${{github.ref}}" = "refs/heads/master" ]; then
echo "::set-env name=RUSEFI_FTP_SERVER::${{secrets.RUSEFI_FTP_SERVER}}";
echo "::set-env name=RUSEFI_DOXYGEN_FTP_USER::${{secrets.RUSEFI_DOXYGEN_FTP_USER}}";
echo "::set-env name=RUSEFI_DOXYGEN_FTP_PASS::${{secrets.RUSEFI_DOXYGEN_FTP_PASS}}";
fi
- name: Upload results
run: |
cd mkdocs/
mv site wiki
if [ -n "$RUSEFI_FTP_SERVER" ]; then
echo "Uploading Wiki"
ncftpput -R -z -m -V -u "$RUSEFI_DOXYGEN_FTP_USER" -p "$RUSEFI_DOXYGEN_FTP_PASS" "$RUSEFI_FTP_SERVER" / wiki
fi
[ $? -eq 0 ] || { echo "upload FAILED"; exit 1; }

12
mkdocs/mkdocs.yaml Normal file
View File

@ -0,0 +1,12 @@
site_name: rusEFI Wiki
repo_url: https://github.com/rusefi/rusefi_documentation
edit_uri: edit/master/
theme:
name: readthedocs
collapse_navigation: true
plugins:
- search
- ezlinks:
wikilinks: true
markdown_extensions:
- sane_lists