feat: deploy to pages

This commit is contained in:
cupcakearmy 2023-02-19 13:39:16 +01:00
parent b4771ce23f
commit 178501233f
No known key found for this signature in database
GPG Key ID: 3235314B4D31232F
2 changed files with 52 additions and 0 deletions

19
.github/actions/build/action.yaml vendored Normal file
View File

@ -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

33
.github/workflows/preview.yaml vendored Normal file
View File

@ -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