Merge pull request #68 from bigcommerce/fix/dashboard-source-code #79
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 example site's static content to Pages | |
| on: | |
| push: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup PNPM | |
| uses: pnpm/action-setup@v3 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build all packages | |
| run: pnpm build | |
| - name: Build examples site | |
| run: pnpm build-site -- --base=/big-design-patterns-sandbox/ | |
| - name: Verify build output exists | |
| run: | | |
| if [ ! -d "./packages/examples-site/dist" ]; then | |
| echo "❌ Build output not found at ./packages/examples-site/dist" | |
| exit 1 | |
| else | |
| echo "✅ Build output found" | |
| fi | |
| - name: Setup GitHub Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: "./packages/examples-site/dist" | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| - name: Print deployed URL | |
| run: echo "🚀 Deployed to ${{ steps.deployment.outputs.page_url }}" |