Skip to content

Removed outdated images #919

Removed outdated images

Removed outdated images #919

Workflow file for this run

name: 'Compile for Edge'
on:
push:
branches: [ 'main' ]
pull_request:
branches: [ 'main' ]
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v7
- name: 'Extract Version'
id: get_version
run: |
VERSION=$(jq -r '.version' src/main/manifest.json)
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
- name: 'Remove update_url from manifest.json'
run: |
jq 'del(.update_url)' src/main/manifest.json > src/main/manifest_temp.json
mv src/main/manifest_temp.json src/main/manifest.json
- name: 'Stage Build Output'
run: |
rm -rf dist
cp -r src/main dist
- name: 'Cache NPM Downloads'
uses: actions/cache@v6
with:
path: ~/.npm
key: npm-tools-${{ runner.os }}-htmlminifierterser7-terser5-cleancss5-svgo3
- name: 'Install Minifiers'
run: |
npm install -g \
html-minifier-terser@7 \
terser@5 \
clean-css-cli@5 \
svgo@3
- name: 'Minify HTML, CSS, JS, JSON'
run: |
find dist -name '*.html' -exec html-minifier-terser \
--collapse-whitespace --remove-comments \
--minify-css true --minify-js true -o {} {} \;
find dist -name '*.css' -exec cleancss -o {} {} \;
find dist -name '*.js' -exec terser {} -c -m -o {} \;
find dist -name '*.json' -exec sh -c 'jq -c . "$1" > "$1.tmp" && mv "$1.tmp" "$1"' _ {} \;
- name: 'Upload Artifact'
uses: actions/upload-artifact@v7
with:
name: Osprey-${{ env.VERSION }}-edge
path: dist
compression-level: 9
if-no-files-found: error