From 6116d71287fcad8677009b0e1fd529d3821122fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=97=E9=9B=81=20Cryolitia?= Date: Sat, 9 Dec 2023 12:54:38 +0800 Subject: [PATCH] Update build.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 北雁 Cryolitia --- .github/workflows/build.yaml | 48 ++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..f502b11 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,48 @@ +# This is a basic workflow to help you get started with Actions + +name: Build CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "main" branch + push: + branches: [ "main" ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +permissions: + pages: write + id-token: write + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v2 + with: + version: '8.10.5' + + - uses: actions/setup-node@v4 + with: + cache: 'pnpm' + + - run: pnpm install + + - run: pnpm run build + + - name: Upload GitHub Pages artifact + uses: actions/upload-pages-artifact@v2.0.0 + with: + path: dist + + - name: Deploy GitHub Pages site + uses: actions/deploy-pages@v3.0.1