-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (36 loc) · 1020 Bytes
/
pages.yml
File metadata and controls
44 lines (36 loc) · 1020 Bytes
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
name: Build and Publish Pages
on:
push:
branches:
- main
jobs:
build-and-commit:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build static site
run: npm run build
- name: Commit updated docs
run: |
if [[ -n "$(git status --short docs CNAME)" ]]; then
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add docs CNAME
git commit -m "chore(docs): update GitHub Pages artifacts"
git push
else
echo "No changes to commit"
fi