diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml new file mode 100644 index 0000000..09e03aa --- /dev/null +++ b/.github/workflows/deploy-pages.yml @@ -0,0 +1,47 @@ +name: Publish to GitHub pages + +on: + push: + branches: [main] + workflow_dispatch: + +permissions: + contents: write + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + Github-Pages-Release: + timeout-minutes: 10 + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Prettier + run: pnpm prettier + + - name: Build with Trunk + run: pnpm build + + - name: Setup GitHub Pages + uses: actions/configure-pages@v4 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: "./build" + + - name: Deploy to GitHub Pages 🚀 + id: deployment + uses: actions/deploy-pages@v3 diff --git a/package.json b/package.json index e53cc24..25e8135 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "serve": "docusaurus serve", "write-translations": "docusaurus write-translations", "write-heading-ids": "docusaurus write-heading-ids", - "typecheck": "tsc" + "typecheck": "tsc", + "prettier": "prettier --check ." }, "dependencies": { "@docusaurus/core": "3.4.0", @@ -27,6 +28,7 @@ "@docusaurus/module-type-aliases": "3.4.0", "@docusaurus/tsconfig": "3.4.0", "@docusaurus/types": "3.4.0", + "prettier": "^3.3.2", "typescript": "~5.2.2" }, "browserslist": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9927e3b..a044c63 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,6 +39,9 @@ importers: '@docusaurus/types': specifier: 3.4.0 version: 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + prettier: + specifier: ^3.3.2 + version: 3.3.2 typescript: specifier: ~5.2.2 version: 5.2.2 @@ -3613,6 +3616,11 @@ packages: resolution: {integrity: sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==} engines: {node: ^10 || ^12 || >=14} + prettier@3.3.2: + resolution: {integrity: sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==} + engines: {node: '>=14'} + hasBin: true + pretty-error@4.0.0: resolution: {integrity: sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw==} @@ -9288,6 +9296,8 @@ snapshots: picocolors: 1.0.1 source-map-js: 1.2.0 + prettier@3.3.2: {} + pretty-error@4.0.0: dependencies: lodash: 4.17.21