File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,9 +19,7 @@ concurrency:
1919
2020# Reduce default permissions for security
2121permissions :
22- contents : read
23- checks : write
24- actions : read
22+ contents : write
2523
2624jobs :
2725 # Build (produce production artifacts)
Original file line number Diff line number Diff line change 4848 run : tar -cvzf bwmon.tar.gz react/build server
4949 - name : Setup git config
5050 run : |
51- git config user.name "${GITHUB_ACTOR}"
52- git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
51+ git config --global user.name "${GITHUB_ACTOR}"
52+ git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
5353 - name : Commit release
5454 run : |
5555 git status
7373 fi
7474 env :
7575 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
76+ - name : Update README with new release version
77+ run : |
78+ sed -i "s|wget https://github.com/VREMSoftwareDevelopment/bwmon/releases/download/v[0-9.\-]*/bwmon.tar.gz|wget https://github.com/VREMSoftwareDevelopment/bwmon/releases/download/v${{ github.event.inputs.version }}/bwmon.tar.gz|g" README.md
79+ sed -i "s|Try a demo version of this application|Try the latest demo version|g" README.md
80+ shell : bash
81+ - name : Commit updated README
82+ run : |
83+ git add README.md
84+ git commit -m "Update README for release v${{ github.event.inputs.version }}" || echo "No README changes to commit"
85+ git push origin main || echo "README push failed or blocked"
86+ working-directory : react
87+ - name : Deploy to GitHub Pages (gh CLI)
88+ run : |
89+ git fetch origin gh-pages:gh-pages || git checkout --orphan gh-pages
90+ rm -rf asset-manifest.json favicon.ico index.html manifest.json robots.txt static usage.db
91+ cp -r react/build/* ./
92+ touch .nojekyll
93+ git add .
94+ git commit -m "Deploy to GitHub Pages: ${{ github.sha }}" || echo "No changes to commit"
95+ git push origin gh-pages --force
96+ env :
97+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments