/
action.yaml
57 lines (51 loc) · 1.47 KB
/
action.yaml
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
57
name: Astro Big Doc Deploy
description: Deploy your markdown content using Astro Big Doc Theme
inputs:
path:
description: Path to your markdown content
required: false
default: "."
runs:
using: composite
steps:
- name: Checkout Astro Big Doc builder
uses: actions/checkout@v4
with:
repository: MicroWebStacks/astro-big-doc
path: astro-big-doc
- name: Checkout user repository
uses: actions/checkout@v4
with:
path: user_repo
- name: Copy specific directories and file
run: |
# Remove and copy content directory
rm -rf astro-big-doc/content
cp -R user_repo/content astro-big-doc
# Remove and copy public directory
rm -rf astro-big-doc/public
cp -R user_repo/public astro-big-doc
shell: bash
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Setup PNPM
run: npm install -g pnpm
shell: bash
- name: Install dependencies
run: |
cd astro-big-doc
pnpm install
shell: bash
- name: Build the site
run: |
cd astro-big-doc
#REPO_NAME="${GITHUB_REPOSITORY##*/}"
#export PUBLIC_BASE="/$REPO_NAME"
pnpm run build
shell: bash
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: astro-big-doc/dist