diff --git a/.github/workflows/playground.yml b/.github/workflows/playground.yml new file mode 100644 index 0000000..aedeedb --- /dev/null +++ b/.github/workflows/playground.yml @@ -0,0 +1,66 @@ +name: Playground + +on: + push: + branches: [ master ] + +permissions: + contents: write + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + + - name: Setup Bun + uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1 + with: + bun-version: latest + + - name: Install dependencies + run: bun install + + - name: Generate Swagger JSON and HTML + run: | + mkdir public + bun run start:dev & + sleep 3 + curl -s http://localhost:3000/docs/json > public/swagger.json + cat << 'EOF' > public/index.html + + + + + + LustPress API Playground + + + + +
+ + + + + + EOF + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./public + publish_branch: gh-pages diff --git a/package.json b/package.json index 47e769b..0d3e028 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lustpress", - "version": "8.2.1-alpha", + "version": "8.2.2-alpha", "description": "RESTful and experimental API for PH and other R18 websites", "main": "src/index.ts", "scripts": {