添加中国农业大学信息 (#200) #184
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-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: latest | |
run_install: true | |
- uses: actions/setup-node@v3 | |
with: | |
cache: pnpm | |
- run: pnpm build | |
env: | |
NODE_OPTIONS: --max_old_space_size=4096 | |
- uses: actions/upload-pages-artifact@v1 | |
with: | |
path: docs/.vuepress/dist | |
deploy: | |
runs-on: ubuntu-20.04 | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |