This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build manual with plugged method (Linux) | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
lfs: false | |
- name: Set Node.js version | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Set Python version to 3.10.x | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Use pnpm instead npm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 8 | |
run_install: false | |
- name: Prepare environments | |
run: | | |
cd GameMakerManualExport | |
pnpm install | |
pnpm run init:build | |
- name: Import translations to manual | |
run: | | |
cd GameMakerManualExport | |
pnpm run plugged:gendep | |
pnpm run plugged:import | |
pnpm run plugged:team | |
- name: Clean temp files | |
run: | | |
cd GameMakerManualExport | |
pnpm run clean:temp | |
cd .. | |
- name: Generate index.html | |
run: | | |
cp build/index.htm build/index.html | |
- name: Minify all files | |
uses: GamemakerChina/[email protected] | |
with: | |
directory: 'build' | |
add_suffix: false | |
- name: Add Azure Static Web workflow | |
run: | | |
mkdir -p build/.github/workflows/ | |
cp patch/azure-static-web-apps-plugged-method.yml build/.github/workflows/ | |
- name: Deploy to plugged branch | |
uses: JamesIves/github-pages-deploy-action@releases/v4 | |
with: | |
repository-name: GamemakerChina/manual-plugged | |
token: ${{ secrets.ACCESS_TOKEN }} | |
branch: main | |
folder: build |