Reports #1543
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
name: Reports | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
branches: | |
- 'main' | |
schedule: | |
- cron: '5 5 * * *' | |
workflow_dispatch: | |
env: | |
NEOVIM_DIR: ${{ format('{0}/neovim', github.workspace) }} | |
NEOVIM_REPO: 'neovim/neovim' | |
DOC_DIR: ${{ format('{0}/gh-pages', github.workspace) }} | |
DOC_REPO: ${{ github.repository }} | |
jobs: | |
reports: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
with: | |
path: gh-pages | |
ref: gh-pages | |
fetch-depth: 0 | |
- uses: actions/checkout@v4 | |
with: | |
repository: ${{ env.NEOVIM_REPO }} | |
path: 'neovim' | |
- name: Set $NEOVIM_COMMIT | |
run: | | |
cd "$NEOVIM_DIR" | |
printf 'NEOVIM_COMMIT=%s\n' $(git rev-parse HEAD) >> $GITHUB_ENV | |
- name: Setup git config | |
run: | | |
git config --global user.name 'marvim' | |
git config --global user.email '[email protected]' | |
- name: Install apt packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential cmake gcc-multilib gettext ninja-build clang-tools | |
- name: Update vimpatch report | |
run: | | |
python -m pip install --user requests | |
${GITHUB_WORKSPACE}/ci/vimpatch-report.sh | |
cd "$DOC_DIR" | |
git add --all . | |
git commit -m 'vimpatch report: Automatic update' | |
- name: Update doc_index | |
run: | | |
${GITHUB_WORKSPACE}/ci/doc-index.sh | |
cd "$DOC_DIR" | |
git add --all . | |
git commit -m 'doc index: Automatic update' || true | |
- name: Update user documentation | |
run: | | |
${GITHUB_WORKSPACE}/ci/user-docu.sh | |
cd "$DOC_DIR" | |
git add --all . | |
git commit -m 'user docu: Automatic update' | |
- name: Push update | |
if: (github.event_name != 'pull_request') | |
run: | | |
cd "$DOC_DIR" | |
${GITHUB_WORKSPACE}/ci/truncate-history.sh | |
git push --force https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} |