2023-12-22 01:32:56 +08:00
|
|
|
# This is a basic workflow to help you get started with Actions
|
|
|
|
|
|
|
|
name: Build Next
|
|
|
|
|
|
|
|
# Controls when the workflow will run
|
|
|
|
on:
|
|
|
|
# Triggers the workflow on push or pull request events but only for the "main" branch
|
|
|
|
push:
|
|
|
|
branches: [ "next" ]
|
|
|
|
|
|
|
|
# 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
|
2023-12-22 01:38:15 +08:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2023-12-22 01:32:56 +08:00
|
|
|
|
|
|
|
- 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: Publish to Cloudflare Pages
|
|
|
|
uses: cloudflare/pages-action@v1
|
|
|
|
with:
|
|
|
|
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }}
|
|
|
|
accountId: ${{ secrets.CLOUDFLARE_PAGES_ACCOUNT }}
|
|
|
|
projectName: rle-wiki
|
|
|
|
directory: docs/.vitepress/dist
|