File tree 1 file changed +12
-6
lines changed
1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -41,11 +41,15 @@ jobs:
41
41
- name : Install dependencies
42
42
run : npm install
43
43
44
+ - name : Get version
45
+ id : get_version
46
+ run : echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
47
+
44
48
- name : Build
45
49
run : |
46
50
npx parcel build --public-url /dist/
47
51
cp dist/spreadsheet_component.html spreadsheet.dist.handlebars
48
- npx parcel build --public-url https://lovasoa.github.io/sqlpage-spreadsheet/dist/
52
+ npx parcel build --public-url https://lovasoa.github.io/sqlpage-spreadsheet/${{ steps.get_version.outputs.VERSION }}/ dist/
49
53
cp dist/spreadsheet_component.html spreadsheet.handlebars
50
54
51
55
- name : Create Release ZIP
82
86
run : |
83
87
git config --global user.name 'GitHub Actions'
84
88
git config --global user.email '[email protected] '
85
- git checkout --orphan gh-pages
86
- git rm -rf .
87
- git add dist
88
- git commit -m "Deploy to GitHub Pages"
89
- git push -f origin gh-pages:gh-pages
89
+ git fetch origin gh-pages
90
+ git checkout gh-pages
91
+ mkdir -p ${{ steps.get_version.outputs.VERSION }}
92
+ cp -r dist ${{ steps.get_version.outputs.VERSION }}/
93
+ git add ${{ steps.get_version.outputs.VERSION }}
94
+ git commit -m "Deploy version ${{ steps.get_version.outputs.VERSION }} to GitHub Pages"
95
+ git push origin gh-pages
You can’t perform that action at this time.
0 commit comments