From 77f545af405b4f47e99a925ffa88193e4f3e4015 Mon Sep 17 00:00:00 2001 From: Huynh Tien Date: Mon, 12 Aug 2024 08:07:52 +0700 Subject: [PATCH] Create build.yml --- .github/workflows/build.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..d6e2f8a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,31 @@ +name: Build & Deploy + +on: + push: + branches: [ "main" ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Clone Folia + run: git clone https://github.com/PaperMC/Folia.git + - name: Checkout the Repo + uses: actions/checkout@v4 + with: + path: repo + - name: Change Branch to gh-pages + run: | + cd ./repo + git branch -M gh-pages + - name: Publish + run: | + cd ./Folia + ./gradlew -PpublishDevBundle -Dmaven.repo.local=$GITHUB_WORKSPACE/repo publishToMavenLocal + - name: Push the gh-pages Repo + run: | + git add . + git commit -m "Update Repo" + git push origin gh-pages