File tree Expand file tree Collapse file tree 1 file changed +0
-46
lines changed Expand file tree Collapse file tree 1 file changed +0
-46
lines changed Original file line number Diff line number Diff line change 67
67
env :
68
68
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
69
69
70
- publish-docs :
71
- permissions :
72
- contents : write
73
- needs : release
74
- if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
75
- runs-on : ubuntu-latest
76
- steps :
77
- - name : Checkout
78
- uses : actions/checkout@v4
79
- with :
80
- fetch-depth : 0
81
-
82
- - name : Configure Git
83
- run : |
84
- git config user.name "$GITHUB_ACTOR"
85
- git config user.email "[email protected] "
86
-
87
- - name : Fetch origin
88
- run : git fetch origin
89
-
90
- - name : Checkout gh-pages
91
- run : git checkout gh-pages
92
-
93
- - name : Checkout docs from the current branch
94
- run : git checkout ${{ github.ref }} -- docs
95
-
96
- - name : Add docs
97
- run : git add docs
98
-
99
- - name : Check for changes
100
- id : check_changes
101
- run : |
102
- if git diff --cached --exit-code; then
103
- echo "No changes to commit"
104
- echo "changes=false" >> $GITHUB_ENV
105
- else
106
- echo "changes=true" >> $GITHUB_ENV
107
- fi
108
-
109
- - name : Commit and push changes
110
- if : env.changes == 'true'
111
- run : |
112
- git commit -m "Copy docs from ${{ github.ref }}"
113
- git push origin gh-pages
114
- env :
115
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments