-
Notifications
You must be signed in to change notification settings - Fork 943
55 lines (51 loc) · 1.75 KB
/
Copy pathdocs.yml
File metadata and controls
55 lines (51 loc) · 1.75 KB
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
name: Deploy Docs to GitHub Pages
on:
push:
branches: [main]
paths:
- "docs/**"
pull_request:
paths:
- "docs/**"
workflow_dispatch:
# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f
- name: Install pnpm
uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d
with:
run_install: true
- name: Run build
run: pnpm build:ci
- name: Install, build, and upload your site
uses: withastro/action@44706356b4eb735f8b9035699eb4796241a040c4
with:
path: docs
# with:
# path: . # The root location of your Astro project inside the repository. (optional)
# node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 20. (optional)
package-manager: pnpm@10.33.3 # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
deploy:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128