Skip to content

Commit 7da89b8

Browse files
committed
feat: turborepo ci cache
1 parent dbddbae commit 7da89b8

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

.github/workflows/docs-deploy.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
name: Deploy Docs to Github Pages
22

3+
# Github actions for Turborepos
4+
# ref: https://turborepo.com/docs/guides/ci-vendors/github-actions
5+
36
on:
47
push:
58
branches: ["main"]
6-
paths:
7-
- "apps/docs/**"
9+
paths: ["apps/docs/**"]
810

911
workflow_dispatch:
1012

@@ -13,6 +15,13 @@ jobs:
1315
timeout-minutes: 15
1416
runs-on: ubuntu-latest
1517

18+
# Turborepo remote cache
19+
# ref: https://turborepo.com/docs/guides/ci-vendors/github-actions#remote-caching
20+
21+
env:
22+
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
23+
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
24+
1625
steps:
1726
- name: Check out code
1827
uses: actions/checkout@v4
@@ -35,12 +44,18 @@ jobs:
3544
- name: Build
3645
run: pnpm build
3746

47+
# Upload static files as artifact to deploy to github pages
48+
# ref: https://github.com/actions/upload-pages-artifact
49+
3850
- name: Upload static files as artifact
3951
id: deployment
4052
uses: actions/upload-pages-artifact@v3
4153
with:
4254
path: apps/docs/out/
4355

56+
# Deploy to github pages
57+
# ref: https://github.com/actions/deploy-pages
58+
4459
deploy:
4560
needs: build
4661

apps/docs/next.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import type { NextConfig } from "next";
22

33
const nextConfig: NextConfig = {
4+
// Build static files to deploy to Github Pages
5+
// ref: https://nextjs.org/docs/app/getting-started/deploying#static-export
46
output: "export",
57
basePath: "/ygo-ruling-ai-chatbot",
68
};

0 commit comments

Comments
 (0)