Merge pull request #560 from OpenWebGAL/dependabot/npm_and_yarn/body-… #213
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: Deploy WebGAL Demo Page | |
on: | |
push: | |
branches: | |
- main | |
# 任务 | |
jobs: | |
build-webgal-static-webpage : | |
# 服务器环境:最新版 Ubuntu | |
runs-on: ubuntu-latest | |
steps: | |
# 拉取代码 | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'yarn' | |
# 安装依赖 | |
- name: Install | |
run: npm install yarn -g && yarn install | |
# 生成静态文件 | |
- name: Build | |
run: yarn build && cd ./packages/webgal && touch dist/.nojekyll | |
# 部署到 GitHub Pages | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@releases/v4 | |
with: | |
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} # 也就是我们刚才生成的 secret | |
BRANCH: live-demo-page | |
FOLDER: packages/webgal/dist |