ci: deploy main to cloudflare pages
parent
472699cd5a
commit
b635df795a
|
@ -22,19 +22,11 @@ jobs:
|
||||||
- run: pnpm build
|
- run: pnpm build
|
||||||
env:
|
env:
|
||||||
NODE_OPTIONS: --max_old_space_size=4096
|
NODE_OPTIONS: --max_old_space_size=4096
|
||||||
- uses: actions/upload-pages-artifact@v1
|
- name: Publish to Cloudflare Pages
|
||||||
|
uses: cloudflare/pages-action@v1
|
||||||
with:
|
with:
|
||||||
path: docs/.vitepress/dist
|
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }}
|
||||||
deploy:
|
accountId: ${{ secrets.CLOUDFLARE_PAGES_ACCOUNT }}
|
||||||
runs-on: ubuntu-20.04
|
projectName: rle-wiki
|
||||||
needs: build
|
directory: docs/.vitepress/dist
|
||||||
permissions:
|
wranglerVersion: '3'
|
||||||
pages: write
|
|
||||||
id-token: write
|
|
||||||
environment:
|
|
||||||
name: github-pages
|
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
|
||||||
steps:
|
|
||||||
- name: Deploy to GitHub Pages
|
|
||||||
id: deployment
|
|
||||||
uses: actions/deploy-pages@v1
|
|
||||||
|
|
|
@ -1,51 +0,0 @@
|
||||||
# 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
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v3
|
|
||||||
with:
|
|
||||||
version: '8.15.4'
|
|
||||||
|
|
||||||
- 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
|
|
||||||
wranglerVersion: '3'
|
|
Loading…
Reference in New Issue