forked from QLNU-Sec-Team/QLNU-Sec-Team.github.io
-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (27 loc) · 888 Bytes
/
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
name: Deploy to GitHub Pages
on:
push:
branches:
- main # 设置为您项目的主分支
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20' # 设置为您项目所需的 Node.js 版本
- name: Install dependencies
run: npm install
- name: Build project
run: npm run build
- name: Create CNAME file
run: echo 'www.qlnu-sec.cn' > ./dist/CNAME # 将 'your-custom-domain.com' 替换为您的自定义域名
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist # 设置为您的 Astro 项目构建输出目录