diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml new file mode 100644 index 0000000..d076a18 --- /dev/null +++ b/.github/workflows/github-pages.yml @@ -0,0 +1,34 @@ +name: 'GitHub Pages' +on: [push] + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +jobs: + package: + runs-on: ubuntu-latest + container: + image: wonderlandengine/editor:1.4.7 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Build Project + run: /usr/local/bin/entrypoint.sh WonderlandEditor --windowless --package --project WonderBricks.wlp --output ./public/ + env: + WLE_CREDENTIALS: ${{ secrets.WLE_CREDENTIALS }} + - name: Gzip + run: find ./public/ -type f ! -name '*.gz' -exec gzip -k "{}" \; + - name: Upload artifact + uses: actions/upload-pages-artifact@v4 + with: + path: ./public + deploy-pages: + needs: package + runs-on: ubuntu-latest + if: ${{ format('refs/heads/{0}', github.event.repository.default_branch) == github.ref }} + steps: + - name: Deploy to GitHub Pages + uses: actions/deploy-pages@v4