diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..cd2663d --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,34 @@ +name: Build and Deploy Ren'Py Web +on: + push: + branches: + - main # Update if your primary branch is named something else (e.g., 'master') + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Download and Install Ren'Py SDK + env: + RENPY_VERSION: "8.2.1" # Ensure this matches the version you built the game with + run: | + # Download and extract to the system's temporary directory to keep the workspace clean + wget https://www.renpy.org/dl/${RENPY_VERSION}/renpy-${RENPY_VERSION}-sdk.tar.bz2 + tar -xjf renpy-${RENPY_VERSION}-sdk.tar.bz2 -C /tmp + mv /tmp/renpy-${RENPY_VERSION}-sdk /tmp/renpy-sdk + + - name: Build Web Distribution + run: | + # Execute the build from the /tmp directory, targeting your workspace root + /tmp/renpy-sdk/renpy.sh /tmp/renpy-sdk/launcher web_build $GITHUB_WORKSPACE $GITHUB_WORKSPACE/web-dist + + - name: Deploy to Gitea Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./web-dist + publish_branch: pages + force_orphan: true \ No newline at end of file