mirror of
https://github.com/IrosTheBeggar/mStream.git
synced 2025-10-27 07:31:02 +00:00
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
|
|
name: Update Website
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
update-website:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: get node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
- name: checkout mstream.io source code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: website
|
|
repository: IrosTheBeggar/mstream-website
|
|
token: ${{ secrets.github_token }}
|
|
ref: master
|
|
- name: checkout mStream app code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: mstream
|
|
repository: IrosTheBeggar/mStream
|
|
token: ${{ secrets.github_token }}
|
|
ref: master
|
|
- run: ls
|
|
- run: |
|
|
cd website
|
|
VERS=$(node -pe "require('../mstream/package.json').version")
|
|
node -pe "require('../mstream/package.json').version"
|
|
echo "v$(node -pe "require('../mstream/package.json').version")"
|
|
echo $VERS
|
|
sed -i "s/[1-9]\+[0-9]*\.[0-9]\+\.[0-9]\+/$VERS/g" templates/express.html
|
|
git config user.name github-actions
|
|
git config user.email github-actions@github.com
|
|
git add .
|
|
git commit -m "action: update server"
|
|
git push
|
|
|
|
|