Bump actions/checkout from 4 to 6 (#3) #2
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
| # Deploy website to GitHub Pages (see scripts/website_build.sh). | |
| # Custom domain: adclaw.agentscope.io (CNAME). | |
| name: Deploy website to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "website/**" | |
| - "scripts/install.sh" | |
| - "scripts/install.ps1" | |
| - ".github/workflows/deploy-website.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: deploy-website | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "pnpm" | |
| cache-dependency-path: website/pnpm-lock.yaml | |
| - name: Install dependencies | |
| working-directory: website | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| working-directory: website | |
| env: | |
| VITE_BASE_PATH: "/" | |
| run: pnpm run build | |
| # Copy installation scripts so they are served from the website | |
| # (e.g. adclaw.agentscope.io/install.sh) instead of raw.githubusercontent.com, | |
| # which may be blocked by some firewalls. | |
| - name: Copy installation scripts to dist | |
| run: cp scripts/install.sh scripts/install.ps1 website/dist/ | |
| # 404.html fallback for unknown paths (real routes from build script). | |
| - name: 404 fallback for GitHub Pages | |
| run: cp website/dist/index.html website/dist/404.html | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: website/dist | |
| cname: adclaw.agentscope.io |