优化 protobuf 实现 (#18) #11
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: github-pages | |
# 什么时候运行? | |
on: | |
# 当主分支(master)有新提交且 src/docs/ 目录下文件有改动时运行 | |
push: | |
branches: | |
- 'master' | |
paths: | |
- 'src/options/**' | |
- 'src/player/**' | |
# 也可以在 GitHub Actions 手动运行 | |
workflow_dispatch: | |
# 执行什么操作 | |
jobs: | |
deploy: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{steps.deployment.outputs.page_url}} | |
runs-on: ubuntu-latest | |
steps: | |
# 检出存储库以供工作流访问 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# 配置站点数据 | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
# 安装 node.js | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'latest' | |
# 更新 npm 依赖 | |
- name: Update npm | |
run: npm update | |
# 生成网页资源 | |
- name: Build and release | |
run: npm run build | |
# 上传网页资源(位于 /dist/options/ 目录) | |
- name: Upload Artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: './dist/options/' | |
# 部署网页 | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |