diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5eafe1a051..64aa4e1e62 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -197,6 +197,11 @@ jobs: DATE="$(date +%Y-%m-%d)" sed -i "s~\${maven\.build\.timestamp}~$DATE~g" ./CHANGELOG.md echo "$(cat ./CHANGELOG.md)" >> './docs/Documentation/CHANGELOG.md' + - name: Set ref in download commands + run: | + GIT_SHA="$(cd docs/_tutorials && git rev-parse HEAD)" + if [ $VERSION_TYPE == 'release' ]; then REFERENCE="${{ github.ref }}"; else REFERENCE="${GIT_SHA}" fi + find docs -type f -exec sed -i "s#/bq download BetonQuest/Quest-Tutorials \${ref} QuestPackages #/bq download BetonQuest/Quest-Tutorials ${REFERENCE} QuestPackages #" {} + - name: Set user feedback form version in mkdocs.yml run: | sed -i "s~%VERSION%~${VERSION}~g" ./mkdocs.yml @@ -290,7 +295,6 @@ jobs: echo "upload_path=$UPLOAD_PATH" >> $GITHUB_OUTPUT env: REPOSITORY_URL: ${{ vars.REPOSITORY_URL }} - deploy-docs: name: Deploy Docs concurrency: gh-pages-deploy @@ -309,6 +313,7 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 + submodules: ${{ env.VERSION_TYPE == 'release' }} - name: Create LFS file list run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id - name: Restore LFS cache @@ -386,6 +391,15 @@ jobs: mike delete "$TWO_DIGIT_VERSION-DEV" fi mike deploy "${FLAGS[@]}" "${VERSION[@]}" + - name: Set version Tag for Quest-Tutorials submodule + if: "env.VERSION_TYPE == 'release'" + run: | + git config --global user.name "BetonQuest-Bot" + git config --global user.email "contact@betonquest.org" + + cd docs/_tutorials + git tag v${VERSION} + git push origin v${VERSION} create-release: name: Create GitHub Release if: "needs.prepare.outputs.VERSION_TYPE == 'release' && needs.deploy-artifacts.result == 'success' && needs.deploy-docs.result == 'success'" diff --git a/docs/Tutorials/Getting-Started/Basics/Conditions.md b/docs/Tutorials/Getting-Started/Basics/Conditions.md index 68ad39d290..322ebaebee 100644 --- a/docs/Tutorials/Getting-Started/Basics/Conditions.md +++ b/docs/Tutorials/Getting-Started/Basics/Conditions.md @@ -22,7 +22,7 @@ In this tutorial you will learn how to create and use conditions! @snippet:tutorials:download-setup-warning@ ``` - /bq download BetonQuest/Quest-Tutorials main QuestPackages /Basics/Conditions/1-DirectoryStructure /tutorialQuest + /bq download BetonQuest/Quest-Tutorials ${ref} QuestPackages /Basics/Conditions/1-DirectoryStructure /tutorialQuest ``` You can now find all files needed for this tutorial in this location: "_YOUR-SERVER-LOCATION/plugins/BetonQuest/QuestPackages/tutorialQuest_" @@ -94,7 +94,7 @@ If it is day it should show true and if it is night, false. @snippet:tutorials:download-solution@ ``` - /bq download BetonQuest/Quest-Tutorials main QuestPackages /Basics/Conditions/2-FirstCondition /tutorialQuest overwrite + /bq download BetonQuest/Quest-Tutorials ${ref} QuestPackages /Basics/Conditions/2-FirstCondition /tutorialQuest overwrite ``` ## 4. Integrating conditions into objectives @@ -227,7 +227,7 @@ and won't give you more! @snippet:tutorials:download-solution@ ``` - /bq download BetonQuest/Quest-Tutorials main QuestPackages /Basics/Conditions/3-ConditionsInConversations /tutorialQuest overwrite + /bq download BetonQuest/Quest-Tutorials ${ref} QuestPackages /Basics/Conditions/3-ConditionsInConversations /tutorialQuest overwrite ``` ### 5.2. Limiting the town tour as well @@ -239,7 +239,7 @@ using the method you just learned. :warning: _This will overwrite any changes (including NPC ID's and locations) you have made to the example.
_ Linking NPCs to conversations is explained in the [basics tutorial](./Conversations.md#1-linking-a-conversation-to-a-npc). ``` - /bq download BetonQuest/Quest-Tutorials main QuestPackages /Basics/Conditions/4-JackCompleted /tutorialQuest overwrite + /bq download BetonQuest/Quest-Tutorials ${ref} QuestPackages /Basics/Conditions/4-JackCompleted /tutorialQuest overwrite ``` ### 5.3. Making the Blacksmith only trade the armor once @@ -370,7 +370,7 @@ in the `items` section of your "_package.yml_" file. @snippet:tutorials:download-solution@ ``` - /bq download BetonQuest/Quest-Tutorials main QuestPackages /Basics/Conditions/5-FullExample /tutorialQuest overwrite + /bq download BetonQuest/Quest-Tutorials ${ref} QuestPackages /Basics/Conditions/5-FullExample /tutorialQuest overwrite ``` ## 6. Conditions in Events diff --git a/docs/Tutorials/Getting-Started/Basics/Conversations.md b/docs/Tutorials/Getting-Started/Basics/Conversations.md index 7e9b3e1fca..0309530289 100644 --- a/docs/Tutorials/Getting-Started/Basics/Conversations.md +++ b/docs/Tutorials/Getting-Started/Basics/Conversations.md @@ -16,7 +16,7 @@ and a NPC. Therefore, these are the basic tool for story telling. @snippet:tutorials:download-setup@ ``` - /bq download BetonQuest/Quest-Tutorials main QuestPackages /Basics/Conversations/1-DirectoryStructure /tutorialQuest overwrite + /bq download BetonQuest/Quest-Tutorials ${ref} QuestPackages /Basics/Conversations/1-DirectoryStructure /tutorialQuest overwrite ``` You can now find all files needed for this tutorial in this location: "_YOUR-SERVER-LOCATION/plugins/BetonQuest/QuestPackages/tutorialQuest_" diff --git a/docs/Tutorials/Getting-Started/Basics/Events.md b/docs/Tutorials/Getting-Started/Basics/Events.md index b7a6dbbba0..fbe7ea4297 100644 --- a/docs/Tutorials/Getting-Started/Basics/Events.md +++ b/docs/Tutorials/Getting-Started/Basics/Events.md @@ -17,7 +17,7 @@ In this tutorial, we will give the player items and teleport them to different l @snippet:tutorials:download-setup-warning@ ``` - /bq download BetonQuest/Quest-Tutorials main QuestPackages /Basics/Conversations/1-DirectoryStructure /tutorialQuest + /bq download BetonQuest/Quest-Tutorials ${ref} QuestPackages /Basics/Conversations/1-DirectoryStructure /tutorialQuest ``` You can now find all files needed for this tutorial in this location: "_YOUR-SERVER-LOCATION/plugins/BetonQuest/QuestPackages/tutorialQuest_" @@ -130,7 +130,7 @@ You can also run this command from the console (without the slash at the start). @snippet:tutorials:download-solution@ ``` - /bq download BetonQuest/Quest-Tutorials main QuestPackages /Basics/Events/1-FirstEvent /tutorialQuest overwrite + /bq download BetonQuest/Quest-Tutorials ${ref} QuestPackages /Basics/Events/1-FirstEvent /tutorialQuest overwrite ``` @@ -209,7 +209,7 @@ Now speak with the NPC again to take the tour. @snippet:tutorials:download-solution@ ``` - /bq download BetonQuest/Quest-Tutorials main QuestPackages /Basics/Events/2-TownTour /tutorialQuest overwrite + /bq download BetonQuest/Quest-Tutorials ${ref} QuestPackages /Basics/Events/2-TownTour /tutorialQuest overwrite ``` ## Summary diff --git a/docs/Tutorials/Getting-Started/Basics/Objectives.md b/docs/Tutorials/Getting-Started/Basics/Objectives.md index 48408e0682..0be89646d6 100644 --- a/docs/Tutorials/Getting-Started/Basics/Objectives.md +++ b/docs/Tutorials/Getting-Started/Basics/Objectives.md @@ -18,7 +18,7 @@ fishing fish. The possibilities are nearly endless! You will learn about these i @snippet:tutorials:download-setup-warning@ ``` - /bq download BetonQuest/Quest-Tutorials main QuestPackages /Basics/Objectives/1-DirectoryStructure /tutorialQuest + /bq download BetonQuest/Quest-Tutorials ${ref} QuestPackages /Basics/Objectives/1-DirectoryStructure /tutorialQuest ``` You can now find all files needed for this tutorial in this location: "_YOUR-SERVER-LOCATION/plugins/BetonQuest/QuestPackages/tutorialQuest_" @@ -203,7 +203,7 @@ the dialog to the npc in "_package.yml_". If not, [check the previous tutorials] @snippet:tutorials:download-solution@ ``` - /bq download BetonQuest/Quest-Tutorials main QuestPackages /Basics/Objectives/2-FullExample /tutorialQuest + /bq download BetonQuest/Quest-Tutorials ${ref} QuestPackages /Basics/Objectives/2-FullExample /tutorialQuest ``` ## Summary diff --git a/docs/Tutorials/Syntax/Quest-Packages.md b/docs/Tutorials/Syntax/Quest-Packages.md index 4919c8b508..10aa7e714d 100644 --- a/docs/Tutorials/Syntax/Quest-Packages.md +++ b/docs/Tutorials/Syntax/Quest-Packages.md @@ -87,7 +87,7 @@ Then play around with this system to get a feel for it. @snippet:tutorials:download-complete-files@ ``` - /bq download BetonQuest/Quest-Tutorials main QuestPackages /Syntax/packageStructure/1-MultiFileStructure /packageStructure/MultiFile + /bq download BetonQuest/Quest-Tutorials ${ref} QuestPackages /Syntax/packageStructure/1-MultiFileStructure /packageStructure/MultiFile ``` You can now find all files needed for this tutorial in this location: "_YOUR-SERVER-LOCATION/plugins/BetonQuest/QuestPackages/packageStructure/MultiFile_" @@ -277,7 +277,7 @@ Instead, a new folder will be created in the previous package. @snippet:tutorials:download-complete-files@ ``` - /bq download BetonQuest/Quest-Tutorials main QuestPackages /Syntax/packageStructure/2-SingleFileStructure /packageStructure/SingleFile + /bq download BetonQuest/Quest-Tutorials ${ref} QuestPackages /Syntax/packageStructure/2-SingleFileStructure /packageStructure/SingleFile ``` You can now find all files needed for this tutorial in this location: "_YOUR-SERVER-LOCATION/plugins/BetonQuest/QuestPackages/packageStructure/SingleFile_" @@ -311,7 +311,7 @@ By creating a folder with a _package.yml_ file inside another package, you creat @snippet:tutorials:download-complete-files@ ``` - /bq download BetonQuest/Quest-Tutorials main QuestPackages /Syntax/packageStructure/3-PackageInPackage /packageStructure/PackageInPackage + /bq download BetonQuest/Quest-Tutorials ${ref} QuestPackages /Syntax/packageStructure/3-PackageInPackage /packageStructure/PackageInPackage ``` You can now find all files needed for this tutorial in this location: "_YOUR-SERVER-LOCATION/plugins/BetonQuest/QuestPackages/packageStructure/PackageInPackage_" @@ -343,7 +343,7 @@ in the directory tree. @snippet:tutorials:download-complete-files@ ``` - /bq download BetonQuest/Quest-Tutorials main QuestPackages /Syntax/packageStructure/4-SubDirectory /packageStructure/SubDirectory + /bq download BetonQuest/Quest-Tutorials ${ref} QuestPackages /Syntax/packageStructure/4-SubDirectory /packageStructure/SubDirectory ``` You can now find all files needed for this tutorial in this location: "_YOUR-SERVER-LOCATION/plugins/BetonQuest/QuestPackages/packageStructure/SubDirectory_"