-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (66 loc) · 2.13 KB
/
Copy pathdeploy.yml
File metadata and controls
71 lines (66 loc) · 2.13 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Deploy Astro site to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# check-publish-policy 가 push 이전 커밋(POLICY_GIT_BASELINE)과 비교해
# 신규 글을 감지할 수 있도록 전체 이력을 받는다.
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Configure Pages
uses: actions/configure-pages@v5
- name: Install dependencies
run: npm ci
- name: Build
env:
PUBLIC_COMMENTS_API_URL: https://slowave-blog-comments.zyqn.workers.dev
run: npm run build
- name: Check SEO
run: npm run check:seo
- name: Check AdSense readiness
run: npm run check:adsense
- name: Check content quality
run: npm run check:content-quality
- name: Check taxonomy and indexing policy
run: npm run check:taxonomy
- name: Test publish policy validator (negative fixtures)
run: npm run test:publish-policy
- name: Check publish policy (archive integrity + new-post gates)
env:
# push는 이전 SHA와 committed diff를 반드시 비교한다. workflow_dispatch에는 before가
# 없으므로 의도적으로 fail-closed하며, 안전한 base를 제공하는 별도 변경 전에는 배포하지 않는다.
POLICY_GIT_BASELINE: ${{ github.event.before }}
POLICY_REQUIRE_COMMITTED_DIFF: 'true'
run: npm run check:publish-policy
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5