diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml new file mode 100644 index 0000000..3bda49a --- /dev/null +++ b/.github/workflows/deploy-preview.yml @@ -0,0 +1,36 @@ +name: Deploy Preview + +on: + push: + branches: + - main + +permissions: {} + +jobs: + deploy-docs: + permissions: + contents: write # to write to gh-pages branch (peaceiris/actions-gh-pages) + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + with: + version: 10 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + cache: "pnpm" + + - name: Install packages + run: pnpm install + + - name: Build + run: pnpm run build + + - name: Deploy docs + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: dist diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..32cfab6 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v22.18.0