Skip to content

Commit 36cbdcc

Browse files
authored
chore: add docs workflow (#655)
1 parent 8c5e76b commit 36cbdcc

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Deploy rootjs.dev
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '22'
21+
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v4
24+
with:
25+
version: '8.9.0'
26+
27+
- name: Get pnpm store directory
28+
shell: bash
29+
run: |
30+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
31+
32+
- name: Setup pnpm cache
33+
uses: actions/cache@v4
34+
with:
35+
path: ${{ env.STORE_PATH }}
36+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
37+
restore-keys: |
38+
${{ runner.os }}-pnpm-store-
39+
40+
- name: Install dependencies
41+
run: |
42+
pnpm install
43+
pnpm add -g firebase-tools@13.35.1
44+
45+
- name: Authenticate to Google Cloud
46+
uses: google-github-actions/auth@v2
47+
with:
48+
credentials_json: ${{ secrets.GOOGLE_CREDENTIALS }}
49+
50+
- name: Setup Google Cloud CLI
51+
uses: google-github-actions/setup-gcloud@v2
52+
with:
53+
project_id: rootjs-dev
54+
55+
- name: Build root
56+
run: pnpm run build
57+
58+
- name: Build and deploy rootjs.dev
59+
working-directory: docs
60+
run: pnpm run deploy

0 commit comments

Comments
 (0)