mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-16 08:56:04 +01:00
misc: Remove the handbook from the main repository
sorry guys, i just wanted to do something cool...
This commit is contained in:
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
@@ -36,13 +36,8 @@ jobs:
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle', 'gradle.properties', '**/*.accesswidener') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- name: Download Handbook
|
||||
uses: suisei-cn/actions-download-file@v1.4.0
|
||||
with:
|
||||
url: https://api.grasscutter.io/static/handbook.html
|
||||
target: src/main/resources/html/
|
||||
- name: Run Gradle
|
||||
run: ./gradlew -PskipHandbook=1 && ./gradlew jar -PskipHandbook=1
|
||||
run: ./gradlew && ./gradlew jar
|
||||
- name: Upload build
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
||||
2
.github/workflows/check_code.yml
vendored
2
.github/workflows/check_code.yml
vendored
@@ -38,7 +38,7 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- name: Format Code
|
||||
run: ./gradlew -PskipHandbook=1 && ./gradlew spotlessApply -PskipHandbook=1
|
||||
run: ./gradlew && ./gradlew spotlessApply
|
||||
|
||||
- run: git config --global user.name "github-actions"
|
||||
- run: git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
126
.github/workflows/handbook.yml
vendored
126
.github/workflows/handbook.yml
vendored
@@ -1,126 +0,0 @@
|
||||
name: "Handbook"
|
||||
|
||||
on:
|
||||
workflow_dispatch: ~
|
||||
push:
|
||||
paths:
|
||||
- "src/handbook/**.tsx"
|
||||
branches:
|
||||
- "development"
|
||||
- "unstable"
|
||||
pull_request:
|
||||
paths:
|
||||
- "src/handbook/**.tsx"
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
|
||||
jobs:
|
||||
Lint-Code:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Extract branch name
|
||||
shell: bash
|
||||
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
|
||||
id: extract_branch
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '17'
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.npm
|
||||
~/.cache
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
- name: Install dependencies
|
||||
working-directory: src/handbook
|
||||
run: npm install --force
|
||||
- name: Run linter
|
||||
working-directory: src/handbook
|
||||
run: npm run lint
|
||||
|
||||
- run: git config --global user.name "github-actions"
|
||||
- run: git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
- run: git stash
|
||||
- run: git checkout ${{ steps.extract_branch.outputs.branch }} && git pull
|
||||
- run: git stash pop || true
|
||||
- name: Commit changes
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
run: git add -u && git commit -m "Lint Code [skip actions]" || true
|
||||
- name: Push changes
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
run: git push --set-upstream --force origin ${{ steps.extract_branch.outputs.branch }}
|
||||
|
||||
Build-Handbook:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '17'
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.npm
|
||||
~/.cache
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
- name: Install dependencies
|
||||
working-directory: src/handbook
|
||||
run: npm install --force
|
||||
|
||||
- name: Download Avatar Data
|
||||
uses: suisei-cn/actions-download-file@v1.4.0
|
||||
with:
|
||||
url: https://api.grasscutter.io/static/avatars.csv
|
||||
target: src/handbook/data/
|
||||
- name: Download Command Data
|
||||
uses: suisei-cn/actions-download-file@v1.4.0
|
||||
with:
|
||||
url: https://api.grasscutter.io/static/commands.json
|
||||
target: src/handbook/data/
|
||||
- name: Download Entity Data
|
||||
uses: suisei-cn/actions-download-file@v1.4.0
|
||||
with:
|
||||
url: https://api.grasscutter.io/static/entities.csv
|
||||
target: src/handbook/data/
|
||||
- name: Download Item Data
|
||||
uses: suisei-cn/actions-download-file@v1.4.0
|
||||
with:
|
||||
url: https://api.grasscutter.io/static/items.csv
|
||||
target: src/handbook/data/
|
||||
- name: Download Scene Data
|
||||
uses: suisei-cn/actions-download-file@v1.4.0
|
||||
with:
|
||||
url: https://api.grasscutter.io/static/scenes.csv
|
||||
target: src/handbook/data/
|
||||
- name: Download Quest Data
|
||||
uses: suisei-cn/actions-download-file@v1.4.0
|
||||
with:
|
||||
url: https://api.grasscutter.io/static/quests.csv
|
||||
target: src/handbook/data/
|
||||
- name: Download Main Quest Data
|
||||
uses: suisei-cn/actions-download-file@v1.4.0
|
||||
with:
|
||||
url: https://api.grasscutter.io/static/mainquests.csv
|
||||
target: src/handbook/data/
|
||||
|
||||
- name: Build handbook
|
||||
working-directory: src/handbook
|
||||
run: npm run build
|
||||
- name: Upload build
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Handbook
|
||||
path: src/handbook/dist/*.html
|
||||
Reference in New Issue
Block a user