fix: update favicon path to reference the correct location in the pro… #14
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 Starlight site to GitHub Pages | |
| on: | |
| push: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow only one concurrent deployment | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| # 🟢 Cache npm dependencies | |
| cache: 'npm' | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| # 🟢 Cache node_modules (backup npm cache) | |
| - name: Cache node_modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node-modules- | |
| # 🟢 Cache Astro build output | |
| - name: Cache Astro build | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| .astro | |
| dist | |
| key: ${{ runner.os }}-astro-build-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-astro-build- | |
| # 🟢 Cache contributors data | |
| - name: Cache Contributors Data | |
| uses: actions/cache@v4 | |
| with: | |
| path: cache | |
| key: ${{ runner.os }}-contributors-${{ github.repository }}-${{ github.run_number }} | |
| restore-keys: | | |
| ${{ runner.os }}-contributors-${{ github.repository }}- | |
| - name: Install dependencies | |
| run: | | |
| # Nếu có cache thì skip install | |
| if [ -d "node_modules" ]; then | |
| echo "Using cached node_modules" | |
| npm ci --prefer-offline --no-audit | |
| else | |
| echo "Installing fresh dependencies" | |
| npm ci | |
| fi | |
| - name: Build site | |
| env: | |
| # 🟢 GitHub token (rate limit 1000/hour) | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: npm run build | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./dist | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |