feat: implement Seed Studio web interface and task automation for Str… #5
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: Deploy Docs to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "docs/**" | |
| # Cho phép chạy thủ công từ Actions tab | |
| workflow_dispatch: | |
| # Cấp quyền ghi vào GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Chỉ cho 1 deployment chạy tại một thời điểm | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Cần để lastUpdated hoạt động | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Enable Corepack (Yarn 4) | |
| run: corepack enable | |
| - name: Install dependencies | |
| working-directory: docs | |
| run: yarn install --immutable | |
| - name: Build VitePress | |
| working-directory: docs | |
| run: yarn build | |
| env: | |
| VITEPRESS_BASE: /launchpad-cms-fullstack/ | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/.vitepress/dist | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |