update-pages-event #15
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: 998 - Before Github pages deploy | |
# Controls when the workflow will run | |
on: | |
repository_dispatch: | |
types: [update-pages-event] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
# Launch Altitude Checks | |
check-altitudes: | |
#if: github.ref == 'refs/heads/main' | |
# The type of runner that the job will run on | |
name: check_altitude_verif_alti | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Clone this repo | |
uses: actions/checkout@v3 | |
# # Add version information to guide_aires_securite.cup | |
- name: Check altitude | |
id: check_altitude | |
run: | | |
# Check Altitude in .cup files | |
cd ./bin | |
chmod a+x ./VerifAlti | |
set +e | |
./VerifAlti --topo ./Alpes_FR_2.trn --summary --error 50 --warning 100 --cup ../guide_aires_securite.cup --md ../doc-reports/Altitude_Check-guide_aires_securite.md | |
set return_code_1 = %ERRORLEVEL% | |
./VerifAlti --topo ./Alpes_FR_2.trn --summary --error 50 --warning 100 --cup ../champs_des_alpes.cup --md ../doc-reports/Altitude_Check-champs_des_alpes.md | |
set return_code_2 = %ERRORLEVEL% | |
./VerifAlti --topo ./Alpes_FR_2.trn --summary --error 50 --warning 100 --cup ../cols_des_alpes.cup --md ../doc-reports/Altitude_Check-cols_des_alpes.md | |
set return_code_3 = %ERRORLEVEL% | |
./VerifAlti --topo ./Alpes_FR_2.trn --summary --error 50 --warning 100 --cup ../mountain_peaks_FR.cup --md ../doc-reports/Altitude_Check-mountain_peaks_FR.md | |
set return_code_3 = %ERRORLEVEL% | |
git pull | |
exit 0 | |
# Push changes to repo | |
- name: Push changes into repo | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: 'Auto Generated' | |
file_pattern: './doc-reports/*.md' | |
check-altitudes-waypointProcessor: | |
#if: github.ref == 'refs/heads/main' | |
# The type of runner that the job will run on | |
name: check-altitude-waypoint-processor | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Clone this repo | |
uses: actions/checkout@v3 | |
- name: Check Altitude .net | |
id: check_altitude_waypoint_processor | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.x' | |
- name: Install and Run | |
run: | | |
cd ./src/WaypointProcessor | |
dotnet build | |
dotnet run -- checkAltitudes -b ../../guide_aires_securite.cup -e 50 -w 100 -v -o ../../doc-reports/Altitude_Check-WaypointProcessor-guide_aires_securite.md | |
dotnet run -- checkAltitudes -b ../../champs_des_alpes.cup -e 50 -w 100 -v -o ../../doc-reports/Altitude_Check-WaypointProcessor-champs_des_alpes.md | |
dotnet run -- checkAltitudes -b ../../cols_des_alpes.cup -e 50 -w 100 -o ../../doc-reports/Altitude_Check-WaypointProcessor-cols_des_alpes.md | |
dotnet run -- checkAltitudes -b ../../mountain_peaks_FR.cup -e 50 -w 100 -o ../../doc-reports/Altitude_Check-WaypointProcessor-mountain_peaks_FR.md | |
git pull | |
# Push changes to repo | |
- name: Push changes into repo | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: 'Auto Generated' | |
file_pattern: './doc-reports/*.md' | |
publish_github_pages: | |
#if: github.ref == 'refs/heads/main' | |
# The type of runner that the job will run on | |
needs: [check-altitudes, check-altitudes-waypointProcessor] | |
runs-on: ubuntu-latest | |
steps: | |
# Update Github Pages | |
- name: Trigger event for github pages update | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
event-type: final-update-pages-event | |