diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 38511f27e1..16f40a976d 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -185,15 +185,15 @@ jobs: with: ref: "refs/pull/${{ github.event.number }}/merge" - - name: gh-pages Clone - run: git clone -b gh-pages --single-branch "https://git@github.com/tgstation/tgstation-server" $HOME/tgsdox - - name: Restore run: dotnet restore - name: Build ReleaseNotes run: dotnet build -c Release -p:TGS_HOST_NO_WEBPANEL=true tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj + - name: gh-pages Clone + run: git clone -b gh-pages --single-branch "https://git@github.com/tgstation/tgstation-server" $HOME/tgsdox + - name: Build Changelog (Incremental) run: | mv $HOME/tgsdox/changelog.yml ./ 2>/dev/null @@ -1649,6 +1649,50 @@ jobs: asset_name: tgstation-server-installer.exe asset_content_type: application/octet-stream + changelog-regen: + name: Regenerate Changelog + runs-on: ubuntu-latest + needs: deploy-tgs + if: (!(cancelled() || failure()) && needs.deploy-tgs.result == 'success') + steps: + - name: Setup dotnet + uses: actions/setup-dotnet@v2 + with: + dotnet-version: ${{ env.TGS_DOTNET_VERSION }} + + - name: Checkout + uses: actions/checkout@v3 + + - name: Restore + run: dotnet restore + + - name: Build ReleaseNotes + run: dotnet build -c Release -p:TGS_HOST_NO_WEBPANEL=true tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj + + - name: gh-pages Clone + run: git clone -b gh-pages --single-branch "https://git@github.com/tgstation/tgstation-server" $HOME/tgsdox + + - name: Build Changelog (Incremental) + run: | + mv $HOME/tgsdox/changelog.yml ./ 2>/dev/null + dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --generate-full-notes + + - name: gh-pages Push + run: | + pushd $HOME/tgsdox + rm -f changelog.yml + popd + sudo mv changelog.yml $HOME/tgsdox/ + cd $HOME/tgsdox + git config --global push.default simple + git config user.name "tgstation-server" + git config user.email "tgstation-server@tgstation13.org" + git add changelog.yml + echo "Committing..." + git diff-index --quiet HEAD || git commit -m "Regenerate changelog post deploy for workflow run ${{ github.run_number }}" -m "Commit: ${{ github.event.head_commit.id }}" + echo "Pushing..." + git push -f "https://${{ secrets.DEV_PUSH_TOKEN }}@github.com/tgstation/tgstation-server" 2>&1 + deploy-docker: name: Deploy TGS (Docker) needs: deploy-tgs diff --git a/.gitignore b/.gitignore index 770d2a28d4..32a0e7ad23 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,5 @@ packaging/ /src/Tgstation.Server.Common/node_modules /src/Tgstation.Server.Common/package.json /src/Tgstation.Server.Common/yarn.lock +/src/Tgstation.Server.Common/logo_bg_white.svg +yarn-error.log* diff --git a/build/logo.svg b/build/logo.svg index 58b432ac35..a3b75b7af6 100644 --- a/build/logo.svg +++ b/build/logo.svg @@ -118,4 +118,8 @@ style="stroke:#ffffff;stroke-width:1;stroke-dasharray:none;stroke-opacity:1" /> + id="path10" /> diff --git a/src/Tgstation.Server.Common/Tgstation.Server.Common.csproj b/src/Tgstation.Server.Common/Tgstation.Server.Common.csproj index 972ee6b33c..9ff1909f7f 100644 --- a/src/Tgstation.Server.Common/Tgstation.Server.Common.csproj +++ b/src/Tgstation.Server.Common/Tgstation.Server.Common.csproj @@ -10,7 +10,7 @@ - + @@ -24,6 +24,6 @@ - + diff --git a/src/Tgstation.Server.Common/build_logo.js b/src/Tgstation.Server.Common/build_logo.js index caf3f2eb7b..c79a46903c 100644 --- a/src/Tgstation.Server.Common/build_logo.js +++ b/src/Tgstation.Server.Common/build_logo.js @@ -1,6 +1,6 @@ // Prereq packages: svg-to-ico@1.0.14 svg2img@1.0.0-beta.2 // Usage: node ./build_logo.js -// Generates ../../artifacts/tgs.ico and ../../artifacts/tgs.ico +// Generates ../../artifacts/tgs.ico and ../../artifacts/tgs.ico const svg_to_img = require("svg-to-ico"); const svg2img = require('svg2img'); @@ -10,12 +10,19 @@ if (!fs.existsSync("../../artifacts")) { fs.mkdirSync("../../artifacts",'0777', true); } +const svg_bytes = fs.readFileSync("../../build/logo.svg"); +const svg = svg_bytes.toString(); +const white_bg_svg = svg + .replace("