Layer improvements #27
Workflow file for this run
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: Verify conflicts in Wiki | |
# Trigger this action only if there are changes pushed to the wiki/** directory in a pull request | |
on: | |
pull_request: | |
branches: [ "main" ] | |
paths: | |
- wiki/** | |
jobs: | |
verify_conflicts_wiki: | |
name: Verify conflicts in wiki | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# 1. Create folder named `tmp_wiki` | |
# 2. Initialize Git | |
# 3. Pull old Wiki content | |
- name: Pull content from wiki | |
run: | | |
mkdir tmp_wiki | |
cd tmp_wiki | |
git init | |
git pull https://github.com/ditrit/OGrEE-Core.wiki.git | |
- name: Setup main branch locally without switching current branch | |
run: git fetch origin main:main | |
# 4. Try to apply all the changes to the wiki | |
- name: Get changes | |
run: git diff --no-ext-diff main:wiki/ HEAD:wiki/ > wiki_diff | |
- name: Prepare changes | |
run: | | |
sed -i "s/a\/wiki/a/" wiki_diff | |
sed -i "s/b\/wiki/b/" wiki_diff | |
- name: Apply changes | |
run: | | |
cd tmp_wiki | |
git apply --ignore-space-change ../wiki_diff |