File tree 1 file changed +18
-22
lines changed
1 file changed +18
-22
lines changed Original file line number Diff line number Diff line change 6
6
workflow_dispatch :
7
7
8
8
jobs :
9
- docs :
9
+ build :
10
10
runs-on : ubuntu-latest
11
-
12
11
steps :
13
12
- uses : actions/checkout@v4
14
13
with :
@@ -19,34 +18,31 @@ jobs:
19
18
with :
20
19
node-version : 22
21
20
cache : npm
22
-
23
- - name : Setup Pages
24
- uses : actions/configure-pages@v4
25
21
26
22
- name : Install dependencies
27
23
run : npm ci
28
24
29
25
- name : Build with VitePress
30
26
run : npm run docs:build
31
27
32
- - name : Deploy to GitHub Pages
33
- uses : crazy-max/ghaction-github-pages@v4
28
+ - name : Generate CNAME
29
+ run : echo "interview.doocs.org" > docs/.vitepress/dist/CNAME
30
+
31
+ - name : Upload artifact
32
+ uses : actions/upload-pages-artifact@v3
34
33
with :
35
- target_branch : gh-pages
36
- build_dir : docs/.vitepress/dist
37
- fqdn : interview.doocs.org
38
- env :
39
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34
+ path : docs/.vitepress/dist
40
35
41
- build :
36
+ deploy :
37
+ needs : build
42
38
runs-on : ubuntu-latest
43
- if : github.repository == 'doocs/coding-interview'
44
- needs : docs
39
+ permissions :
40
+ pages : write
41
+ id-token : write
42
+ environment :
43
+ name : github_pages
44
+ url : ${{ steps.deployment.outputs.page_url }}
45
45
steps :
46
- - name : Sync to Gitee
47
- uses : wearerequired/git-mirror-action@master
48
- env :
49
- SSH_PRIVATE_KEY : ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
50
- with :
51
- source-repo :
[email protected] :doocs/coding-interview.git
52
- destination-repo :
[email protected] :Doocs/coding-interview.git
46
+ - name : Deploy to GitHub Pages
47
+ id : deployment
48
+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments