File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ name: GitHub Actions
1414# yamllint disable-line rule:truthy
1515on :
1616 push :
17- branches : [master]
17+ branches :
18+ - master
19+ - publish
1820 pull_request :
1921 branches : [master]
2022
4446 - name : build doc
4547 run : ./.github/actions/build-sof-doc.sh
4648
49+ - name : prepare file for deploy
50+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/publish' }}
51+ run : ./.github/actions/create-publish-folder.sh
52+
53+ # store the build result to artifact, used for later deploy or download for debug
54+ # https://docs.github.com/en/actions/guides/storing-workflow-data-as-artifacts
55+ - name : upload HTML for deploy
56+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/publish' }}
57+ uses : actions/upload-artifact@v2
58+ with :
59+ name : html
60+ path : _build/html
61+
62+ deploy :
63+ needs : build-basic
64+ runs-on : ubuntu-20.04
65+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/publish' }}
66+ steps :
67+ - name : download HTML
68+ uses : actions/download-artifact@v2
69+ with :
70+ name : html
71+ path : html
72+
73+ - name : deploy
74+ uses : peaceiris/actions-gh-pages@v3
75+ with :
76+ personal_token : ${{ secrets.ACTIONS_DEPLOY_KEY }}
77+ publish_dir : ./html/
78+ publish_branch : master
79+ external_repository : thesofproject/thesofproject.github.io
80+
81+
4782 build-lax :
4883
4984 name : " build with requirements-lax.txt"
You can’t perform that action at this time.
0 commit comments