Skip to content

Update-help-menu-git-pages #414

Update-help-menu-git-pages

Update-help-menu-git-pages #414

# 1) This workflow formats and updates the translation files.
# 2) Adds translators to the contributor files.
# Original implementation by: https://github.com/Thodor12
# The workflow name
name: Update-help-menu-git-pages
on:
workflow_run:
workflows:
- Update-translations
types:
- completed
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# The list of jobs this workflow executes
jobs:
# Updates the translations
generate_doc:
name: Generates json files for help menu and translations
runs-on: ubuntu-latest
container: ubuntu
steps:
- run: apt-get update && apt-get install -y openssh-client git
- name: Checkout repository
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Fetch json data.
run: |
python -m pip install -r .github/scripts/update-help-menu/requirements.txt
python .github/scripts/update-help-menu/gatherHelpMenuContent.py
- name: Pushes to another repository
uses: cpina/[email protected]
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: help_menu_cache_data/
destination-github-username: 'Courseplay'
destination-repository-name: 'Courseplay_FS22.github.io'
commit-message: 'Updated from Courseplay_FS22'
target-directory: data/
target-branch: master