-
Notifications
You must be signed in to change notification settings - Fork 87
56 lines (48 loc) · 1.36 KB
/
astro.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Astro Docs Site
on:
push:
branches: [main]
paths:
- 'docs/**'
- '.github/workflows/astro.yml'
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: latest
run_install: false
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: |
pnpm install --no-frozen-lockfile
pnpm --filter "docs" install --no-frozen-lockfile
- name: Create local build artifacts
run: |
echo "Building documentation..."
pnpm exec nx package docs --skip-nx-cache
- name: Init git and commit local artifacts
run: |
ls -la
ls -la docs
cd docs/dist
git init
git add .
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -am "docs: build doc"
- name: Push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GH_ACTION_TOKEN }}
branch: astro-docs
force: true
directory: docs/dist