mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 00:39:50 +08:00
fix: fix website build and add taskfile (#2577)
* chore: update dependencies * docs: update source documents * chore: use Taskfile instead of scripts
This commit is contained in:
parent
fbe7d4de6b
commit
0f791c71f4
13
.github/workflows/sync-translated-documents.yml
vendored
13
.github/workflows/sync-translated-documents.yml
vendored
@ -10,15 +10,22 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set node
|
||||
- name: Setup Nodejs
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
node-version: 18.x
|
||||
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v1
|
||||
with:
|
||||
version: 3.x
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Sync Translated Documents
|
||||
run: cd scripts && chmod 755 ./sync-translated-documents.sh && ./sync-translated-documents.sh
|
||||
env:
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
working-directory: ./website
|
||||
run: task crowdin:pull
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
|
@ -1,8 +1,9 @@
|
||||
name: Push Checks
|
||||
name: Upload Source Documents
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
push_files_to_crowdin:
|
||||
@ -21,17 +22,20 @@ jobs:
|
||||
website/**/*.md
|
||||
website/**/*.json
|
||||
|
||||
- name: Set node
|
||||
- name: Setup Nodejs
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
node-version: 18.x
|
||||
|
||||
- name: Push files
|
||||
- name: Setup Task
|
||||
uses: arduino/setup-task@v1
|
||||
with:
|
||||
version: 3.x
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Upload source documents
|
||||
if: steps.changed-files.outputs.any_changed == 'true'
|
||||
env:
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
run: |
|
||||
cd website
|
||||
corepack enable
|
||||
pnpm install
|
||||
pnpm run crowdin push -b master
|
||||
working-directory: ./website
|
||||
run: task crowdin:push
|
@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd ../website
|
||||
|
||||
npx @crowdin/cli@latest pull -b master --export-only-approved
|
1
website/.gitignore
vendored
1
website/.gitignore
vendored
@ -6,6 +6,7 @@
|
||||
|
||||
# Generated files
|
||||
.docusaurus
|
||||
.task
|
||||
.cache-loader
|
||||
|
||||
# Misc
|
||||
|
46
website/Taskfile.yml
Normal file
46
website/Taskfile.yml
Normal file
@ -0,0 +1,46 @@
|
||||
# https://taskfile.dev
|
||||
|
||||
version: "3"
|
||||
|
||||
tasks:
|
||||
install:
|
||||
desc: Install Dependencies
|
||||
aliases: [i]
|
||||
cmds:
|
||||
- corepack prepare pnpm@8.2.0 --activate
|
||||
- pnpm install
|
||||
sources:
|
||||
- package.json
|
||||
- pnpm-lock.yaml
|
||||
|
||||
default:
|
||||
desc: Start Website
|
||||
deps: [install]
|
||||
aliases: [s, start]
|
||||
cmds:
|
||||
- npx docusaurus start
|
||||
|
||||
build:
|
||||
desc: Build Website
|
||||
deps: [install]
|
||||
cmds:
|
||||
- npx docusaurus build
|
||||
|
||||
preview:
|
||||
desc: Preview Website
|
||||
deps: [build]
|
||||
aliases: [serve]
|
||||
cmds:
|
||||
- npx docusaurus serve
|
||||
|
||||
crowdin:push:
|
||||
desc: Upload source files to Crowdin
|
||||
deps: [install]
|
||||
cmds:
|
||||
- npx crowdin push -b master
|
||||
|
||||
crowdin:pull:
|
||||
desc: Download approved translation files from Crowdin to local
|
||||
deps: [install]
|
||||
cmds:
|
||||
- npx crowdin pull -b master --export-only-approved
|
@ -32,7 +32,7 @@
|
||||
},
|
||||
"theme.ErrorPageContent.tryAgain": {
|
||||
"message": "Try again",
|
||||
"description": "The label of the button to try again when the page crashed"
|
||||
"description": "The label of the button to try again rendering when the React error boundary captures an error"
|
||||
},
|
||||
"theme.NotFound.title": {
|
||||
"message": "Page Not Found",
|
||||
@ -419,5 +419,13 @@
|
||||
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": {
|
||||
"message": "Toggle navigation bar",
|
||||
"description": "The ARIA label for hamburger menu button of mobile navigation"
|
||||
},
|
||||
"theme.NavBar.navAriaLabel": {
|
||||
"message": "Main",
|
||||
"description": "The ARIA label for the main navigation"
|
||||
},
|
||||
"theme.docs.sidebar.navAriaLabel": {
|
||||
"message": "Docs sidebar",
|
||||
"description": "The ARIA label for the sidebar navigation"
|
||||
}
|
||||
}
|
||||
|
@ -54,5 +54,9 @@
|
||||
"link.item.label.Discord": {
|
||||
"message": "Discord",
|
||||
"description": "The label of footer link with label=Discord linking to https://discord.gg/JDdSxwjhGf"
|
||||
},
|
||||
"logo.alt": {
|
||||
"message": "Wails Logo",
|
||||
"description": "The alt text of footer logo"
|
||||
}
|
||||
}
|
||||
|
@ -38,5 +38,9 @@
|
||||
"item.label.Code of Conduct": {
|
||||
"message": "Code of Conduct",
|
||||
"description": "Navbar item with label Code of Conduct"
|
||||
},
|
||||
"logo.alt": {
|
||||
"message": "Wails Logo",
|
||||
"description": "The alt text of navbar logo"
|
||||
}
|
||||
}
|
||||
|
12817
website/package-lock.json
generated
12817
website/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -15,11 +15,15 @@
|
||||
"crowdin": "crowdin",
|
||||
"crowdin:sync": "docusaurus write-translations && crowdin upload && crowdin download"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.14.0",
|
||||
"pnpm": ">=8.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@crowdin/crowdin-api-client": "^1.19.2",
|
||||
"@docusaurus/core": "^2.1.0",
|
||||
"@docusaurus/preset-classic": "^2.1.0",
|
||||
"@docusaurus/theme-search-algolia": "^2.1.0",
|
||||
"@docusaurus/core": "^2.4.0",
|
||||
"@docusaurus/preset-classic": "^2.4.0",
|
||||
"@docusaurus/theme-search-algolia": "^2.4.0",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"@swc/core": "^1.3.7",
|
||||
"clsx": "^1.2.1",
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user