From 088c429b72a853e6f884a9d478c7fc021203346d Mon Sep 17 00:00:00 2001 From: scarf Date: Thu, 7 Sep 2023 23:35:18 +0900 Subject: [PATCH] ci: deploy --- .github/workflows/documentation.yml | 40 +++++++++++++++++++++++++++++ deno.jsonc | 1 + docs/.nojekyll | 0 docs/astro.config.mjs | 4 +-- docs/package.json | 1 + 5 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/documentation.yml create mode 100644 docs/.nojekyll diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 000000000000..da98408106f0 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,40 @@ +name: Deploy starlight documentation to GitHub Pages + +on: + push: + branches: [upload] + workflow_dispatch: + +defaults: + run: + working-directory: docs + +permissions: + contents: read + pages: write + id-token: write + +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - name: Checkout your repository using git + uses: actions/checkout@v3 + - name: Install, build, and upload your site + uses: withastro/action@v0 + with: + path: docs + node-version: 20 + package-manager: pnpm + pnpm-version: 8.7.0 + + deploy: + needs: build + runs-on: ubuntu-22.04 + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 diff --git a/deno.jsonc b/deno.jsonc index 3d6fd1105609..8fc2e1b065e6 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -9,6 +9,7 @@ "test": { "include": ["./tools"] }, "lint": { "include": ["./tools"] }, "fmt": { + "exclude": ["./docs/dist"], "include": ["./tools", "./doc", "./docs", "*.md"], "semiColons": false, "lineWidth": 100 diff --git a/docs/.nojekyll b/docs/.nojekyll new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs index c04fc31bc35f..d967cf7d92fa 100644 --- a/docs/astro.config.mjs +++ b/docs/astro.config.mjs @@ -6,8 +6,8 @@ const github = "https://github.com/cataclysmbnteam/Cataclysm-BN" // https://astro.build/config export default defineConfig({ -// site: 'https://scarf005.github.io', -// base: '/Cataclysm-BN/', + site: "https://scarf005.github.io", + base: "/Cataclysm-BN", integrations: [ starlight({ title: "Cataclysm: Bright Nights", diff --git a/docs/package.json b/docs/package.json index 585dcf5d7c51..c85ccfc60fd3 100644 --- a/docs/package.json +++ b/docs/package.json @@ -2,6 +2,7 @@ "name": "docs", "type": "module", "version": "0.0.1", + "packageManager": "pnpm@8.7.0", "scripts": { "dev": "astro dev", "start": "astro dev",