|
1 | 1 | name: Deploy playground to GitHub Pages |
| 2 | + |
2 | 3 | on: |
3 | 4 | push: |
4 | | - branches: [main] |
| 5 | + branches: |
| 6 | + - main |
5 | 7 | workflow_dispatch: |
| 8 | + |
6 | 9 | permissions: |
7 | 10 | contents: read |
8 | 11 | pages: write |
9 | 12 | id-token: write |
| 13 | + |
10 | 14 | concurrency: |
11 | 15 | group: pages |
12 | 16 | cancel-in-progress: true |
| 17 | + |
13 | 18 | jobs: |
14 | 19 | build: |
15 | 20 | runs-on: ubuntu-latest |
16 | 21 | steps: |
17 | | - - uses: actions/checkout@v6 |
18 | | - - uses: actions/setup-node@v6 |
| 22 | + - name: Checkout OWD client (workspace deps) |
| 23 | + uses: actions/checkout@v4 |
| 24 | + with: |
| 25 | + repository: owdproject/client |
| 26 | + path: client |
| 27 | + submodules: recursive |
| 28 | + |
| 29 | + - name: Checkout kit-tailwind |
| 30 | + uses: actions/checkout@v4 |
| 31 | + with: |
| 32 | + repository: owdproject/kit-tailwind |
| 33 | + path: client/packages/kit-tailwind |
| 34 | + |
| 35 | + - name: Checkout kit-primevue |
| 36 | + uses: actions/checkout@v4 |
| 37 | + with: |
| 38 | + repository: owdproject/kit-primevue |
| 39 | + path: client/packages/kit-primevue |
| 40 | + |
| 41 | + - name: Checkout module-fs |
| 42 | + uses: actions/checkout@v4 |
| 43 | + with: |
| 44 | + repository: owdproject/module-fs |
| 45 | + path: client/packages/module-fs |
| 46 | + |
| 47 | + - name: Checkout theme-nova |
| 48 | + uses: actions/checkout@v4 |
| 49 | + with: |
| 50 | + repository: owdproject/theme-nova |
| 51 | + path: client/themes/theme-nova |
| 52 | + |
| 53 | + - name: Overlay this app-debug repo |
| 54 | + uses: actions/checkout@v4 |
| 55 | + with: |
| 56 | + path: client/apps/app-debug |
| 57 | + |
| 58 | + - uses: actions/setup-node@v4 |
19 | 59 | with: |
20 | 60 | node-version: 22 |
| 61 | + |
21 | 62 | - run: npm i -g --force corepack@latest && corepack enable |
22 | | - - run: npx nypm@latest i |
23 | | - - run: npm run dev:prepare |
24 | | - - run: npm run dev:generate |
| 63 | + |
| 64 | + - name: Install monorepo dependencies |
| 65 | + working-directory: client |
| 66 | + run: pnpm install --no-frozen-lockfile |
| 67 | + |
| 68 | + - name: Prepare module and playground |
| 69 | + working-directory: client/apps/app-debug |
| 70 | + run: pnpm run dev:prepare |
| 71 | + |
| 72 | + - name: Generate static playground |
| 73 | + working-directory: client/apps/app-debug |
| 74 | + run: pnpm run dev:generate |
25 | 75 | env: |
26 | 76 | NUXT_APP_BASE_URL: /app-debug/ |
27 | | - - uses: actions/upload-pages-artifact@v3 |
| 77 | + |
| 78 | + - name: Upload Pages artifact |
| 79 | + uses: actions/upload-pages-artifact@v3 |
28 | 80 | with: |
29 | | - path: playground/.output/public |
| 81 | + path: client/apps/app-debug/playground/.output/public |
| 82 | + |
30 | 83 | deploy: |
31 | 84 | needs: build |
32 | | - runs-on: ubuntu-latest |
33 | 85 | environment: |
34 | 86 | name: github-pages |
35 | 87 | url: ${{ steps.deployment.outputs.page_url }} |
| 88 | + runs-on: ubuntu-latest |
36 | 89 | steps: |
37 | | - - uses: actions/deploy-pages@v4 |
| 90 | + - name: Deploy to GitHub Pages |
| 91 | + id: deployment |
| 92 | + uses: actions/deploy-pages@v4 |
0 commit comments