diff --git a/.github/actions/build/action.yaml b/.github/actions/build/action.yaml new file mode 100644 index 0000000..b6b18a5 --- /dev/null +++ b/.github/actions/build/action.yaml @@ -0,0 +1,19 @@ +name: "Build" +description: "Install deps and build docs" + +runs: + using: "composite" + steps: + - uses: pnpm/action-setup@v2 + with: + version: 7 + - uses: actions/setup-node@v3 + with: + node-version: 18 + cache: "pnpm" + - name: Install dependencies + run: pnpm install --frozen-lockfile + shell: bash + - name: Build + run: pnpm build + shell: bash diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml new file mode 100644 index 0000000..0b46bb4 --- /dev/null +++ b/.github/workflows/preview.yaml @@ -0,0 +1,33 @@ +name: Docs + +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/build + + - uses: actions/configure-pages@v3 + - uses: actions/upload-pages-artifact@v1 + with: + path: "./build" + - id: deployment + uses: actions/deploy-pages@v1