Update build.yml #5
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: Build & Deploy | |
on: | |
push: | |
branches: [ "main" ] | |
workflow_dispatch: | |
permissions: write-all | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Folia | |
uses: actions/checkout@v4 | |
with: | |
repository: PaperMC/Folia | |
ref: dev/1.21.1 | |
path: Folia | |
- name: Checkout the Repo | |
uses: actions/checkout@v4 | |
with: | |
path: repo | |
- name: Setup Git user | |
uses: qoomon/actions--setup-git@v1 | |
- name: Change Branch to gh-pages | |
run: | | |
cd ./repo | |
git branch -M gh-pages | |
- name: Publish | |
run: | | |
cd ./Folia | |
./gradlew applyPatches | |
./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 |