@@ -15,10 +15,13 @@ jobs:
15
15
with :
16
16
ref : gh-pages
17
17
18
- - name : tar the existing docs
18
+ - name : remove all symbolic links from root if present
19
19
run : |
20
- mkdir -p ./docs
21
- tar -cvf documentation.tar ./docs
20
+ find . -maxdepth 1 -type l -delete
21
+
22
+ - name : tar the existing docs from root
23
+ run : |
24
+ tar -cvf documentation.tar
22
25
23
26
- name : create a document artifact
24
27
uses : actions/upload-artifact@v4
@@ -33,51 +36,26 @@ jobs:
33
36
- name : Checkout src
34
37
uses : actions/checkout@v5
35
38
36
- - run : mkdir -p ./docs
37
39
- name : Download the existing documents artifact
38
40
uses : actions/download-artifact@v5
39
41
with :
40
42
name : documentation
43
+ - run : rm -rf ./docs # delete previous docs folder present
44
+ - run : mkdir ./docs # create an empty docs folder
41
45
- run : tar -xf documentation.tar -C ./docs
46
+ - run : rm -f documentation.tar
42
47
43
48
- name : Setup
44
49
uses : ./.github/actions/setup
45
50
46
51
- name : Build documents
47
52
run : yarn docs # set up 'docs' build script in your package.json
48
-
49
- - name : Run cleanup and manage document versions
50
- run : node scripts/manage-doc-versions.js
51
-
52
- - name : tar the new docs
53
- run : tar -cvf newdocumentation.tar ./docs
54
53
55
- - name : create a new document artifact
56
- uses : actions/upload-artifact@v4
57
- with :
58
- name : newdocumentation
59
- path : newdocumentation.tar
60
-
61
- commit : # commit the old and new merged documents to gh-pages/docs
62
- needs : build
63
- runs-on : ubuntu-latest
64
- steps :
65
- - name : checkout the gh-pages repo
66
- uses : actions/checkout@v5
67
- with :
68
- ref : gh-pages
54
+ - name : Remove all the symbolic links from docs folder
55
+ run : find ./docs -type l -delete
69
56
70
- - run : mkdir -p ./docs
71
- - name : Download the new documents artifact
72
- uses : actions/download-artifact@v5
73
- with :
74
- name : newdocumentation
75
- - run : tar -xf newdocumentation.tar -C ./docs
57
+ - name : Run cleanup and manage document versions
58
+ run : node scripts/manage-doc-versions.js
76
59
77
- - name : commit
78
- run : |
79
- git config --global user.email "[email protected] "
80
- git config --global user.name "Continuous Integration"
81
- git add .
82
- git commit -m "CI updated the documentation"
83
- git push
60
+ - name : Deploy to github pages using gh-pages
61
+ run : npx gh-pages -d docs
0 commit comments