add system file module #114
This file contains hidden or 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: gh-pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Git | |
| uses: actions/checkout@v4 | |
| - name: Setup Nodejs | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: latest | |
| cache: npm # 因为cache依赖package.json 所以需要先checkout | |
| - name: Npm Install | |
| run: npm install | |
| - name: Npm Build | |
| run: npm run build | |
| - name: Upload Pages | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./dist # 部署编译后的文件 | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |