๐ perf: ๆ ็จ็ๅๆฐ #31
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
# ๅฐ้ๆๅ ๅฎน้จ็ฝฒๅฐ GitHub Pages ็็ฎๆๅทฅไฝๆต็จ | |
name: Deploy static content to Pages | |
on: | |
push: | |
branches: | |
- web | |
# ่ฎพ็ฝฎ GITHUB_TOKEN ็ๆ้๏ผไปฅๅ ่ฎธ้จ็ฝฒๅฐ GitHub Pagesใ | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# ๅ ่ฎธไธไธชๅนถๅ็้จ็ฝฒ | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.10.0 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8.6.10 | |
- name: Build | |
run: pnpm install && pnpm build | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
# Upload dist folder | |
path: './dist' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |