feat: 增加多语言 #139
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: 打包部署 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Install PNPM | |
run: npm install -g pnpm@7 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build | |
run: pnpm build | |
- name: Deploy to build branch | |
run: | | |
git config --global user.name "Yasinchan" | |
git config --global user.email "[email protected]" | |
git checkout -b build | |
shopt -s extglob | |
rm -rf .prettierrc.json .gitignore .eslintrc.cjs .vscode .github !(dist|static.json) | |
mv dist/* . | |
rmdir dist | |
git add . | |
git commit -m "Build and deploy" | |
git push origin build -f |