@@ -3,26 +3,28 @@ name: Test to deploy
33on :
44 push :
55 branches :
6+ - 7.x
7+ - 6.x
68 - 5.x
9+ - dev
710 - test
811jobs :
912 dev :
10- if : github.ref == 'refs/heads/dev'
1113 runs-on : ubuntu-latest
1214 name : A job to Test deploying for dev.
1315 strategy :
1416 matrix :
1517 node_version : ['18', '16']
1618 steps :
1719 - name : Setup Node.js
18- uses : actions/setup-node@v3
20+ uses : actions/setup-node@v6
1921 with :
2022 node-version : ${{ matrix.node_version }}
2123 - name : Clone
2224 run : |
2325 git clone https://github.com/volantis-x/volantis-x.github.io
2426 cd volantis-x.github.io
25- git clone -b dev https://github.com/volantis-x/hexo-theme-volantis themes/volantis
27+ git clone -b ${{ github.ref_name }} https://github.com/volantis-x/hexo-theme-volantis themes/volantis
2628 - name : Generate Public Files
2729 run : |
2830 cd volantis-x.github.io
3133 npm run start
3234 - name : Deploy
3335 if : ${{ matrix.node_version == '16' }}
34- uses : peaceiris/actions-gh-pages@v3
35- with :
36- deploy_key : ${{ secrets.MHUIG_DEPLOY_KEY }}
37- external_repository : volantis-x/volantis-x.github.io
38- publish_branch : gh-pages
39- force_orphan : true
40- publish_dir : ./volantis-x.github.io/public
41- user_name : ' github-actions[bot]'
42- user_email : ' github-actions[bot]@users.noreply.github.com'
43- test :
44- if : github.ref == 'refs/heads/test'
45- runs-on : ubuntu-latest
46- name : A job to Test deploying for test.
47- strategy :
48- matrix :
49- node_version : ['18', '16']
50- steps :
51- - name : Setup Node.js
52- uses : actions/setup-node@v3
53- with :
54- node-version : ${{ matrix.node_version }}
55- - name : Clone
56- run : |
57- git clone https://github.com/volantis-x/volantis-x.github.io
58- cd volantis-x.github.io
59- git clone -b test https://github.com/volantis-x/hexo-theme-volantis themes/volantis
60- - name : Generate Public Files
61- run : |
62- cd volantis-x.github.io
63- npm i
64- npm install hexo-cli -g
65- npm run start
66- - name : Deploy
67- if : ${{ matrix.node_version == '16' }}
68- uses : peaceiris/actions-gh-pages@v3
36+ uses : peaceiris/actions-gh-pages@v4
6937 with :
7038 deploy_key : ${{ secrets.MHUIG_DEPLOY_KEY }}
7139 external_repository : volantis-x/volantis-x.github.io
0 commit comments