From 44befb93f4380e21b4fa3ee87040f508cbe71819 Mon Sep 17 00:00:00 2001 From: Zyie <24736175+Zyie@users.noreply.github.com> Date: Wed, 4 Dec 2024 09:22:42 +0000 Subject: [PATCH] doc deploy --- .github/workflows/deploy-docs.yaml | 33 +++++++++++++++++++ .github/workflows/main.yml | 3 -- package.json | 4 +-- .../template-game-web/src/engine/engine.ts | 2 ++ 4 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/deploy-docs.yaml diff --git a/.github/workflows/deploy-docs.yaml b/.github/workflows/deploy-docs.yaml new file mode 100644 index 0000000..9e41ac6 --- /dev/null +++ b/.github/workflows/deploy-docs.yaml @@ -0,0 +1,33 @@ +name: Deploy Docs + +on: + push: + branches: + - main + - docs + +concurrency: + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} + cancel-in-progress: true + +jobs: + deploy: + name: Deploy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - run: npm ci + - run: | + git config --global user.name "$GITHUB_ACTOR" + git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" + git remote set-url origin https://git:${GIT_PASS}@github.com/pixijs/create-pixi.git + npm run deploy + env: + GIT_USER: $GITHUB_ACTOR + GIT_PASS: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4c4fe36..0666b0b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,8 +20,5 @@ jobs: - name: Test Lint run: npm run test:lint - - name: Test Types - run: npm run test:types - - name: Build for Distribution run: xvfb-run --auto-servernum npm run build diff --git a/package.json b/package.json index 0d02cde..8f5ce7b 100644 --- a/package.json +++ b/package.json @@ -27,11 +27,11 @@ "start": "node index.js", "test": "vitest run", "test:lint": "eslint", - "test:types": "tsc --noEmit", "test:watch": "vitest", "release": "xs bump,git-push", "publish-ci": "xs publish", - "docs": "npm run --workspace docs start" + "docs": "npm run --workspace docs start", + "deploy": "npm run deploy --workspace docs" }, "lint-staged": { "*.{ts,tsx}": [ diff --git a/templates/template-game-web/src/engine/engine.ts b/templates/template-game-web/src/engine/engine.ts index 3df8b4d..acd5182 100644 --- a/templates/template-game-web/src/engine/engine.ts +++ b/templates/template-game-web/src/engine/engine.ts @@ -2,6 +2,8 @@ import { sound } from "@pixi/sound"; import type { ApplicationOptions } from "pixi.js"; import { Application, Assets } from "pixi.js"; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore - This is a dynamically generated file by AssetPack import manifest from "../manifest.json"; import { BGM, SFX } from "./audio";