Trim 2px from height #201
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build pages for TWiLight Menu++ | |
on: | |
push: | |
branches: ["*"] | |
paths-ignore: [README.md, crowdin.yml] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build pages | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
deno-version: [1.32.3] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Install tools | |
run: | | |
sudo apt-get update | |
sudo apt-get install ffmpeg jq p7zip-full -y | |
- name: Use Deno Version ${{ matrix.deno-version }} | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: ${{ matrix.deno-version }} | |
- name: Install Dependencies | |
run: PUPPETEER_PRODUCT=chrome deno run --unstable --allow-env --allow-net --allow-write --allow-read https://deno.land/x/[email protected]/install.ts | |
- name: Run Application | |
run: deno run --unstable --allow-env --allow-run --allow-net --allow-read --allow-write deno.ts web | |
- name: Pack 7z Package for nightly | |
run: | | |
cd nitrofiles | |
7z a ../pages.7z pages | |
- name: Upload to pages release | |
run: | | |
ID=35207926 | |
AUTH_HEADER="Authorization: token ${{ secrets.GITHUB_TOKEN }}" | |
# Update description | |
UPLOAD_URL="https://api.github.com/repos/${{ github.repository }}/releases/$ID" | |
curl -XPATCH -H "$AUTH_HEADER" "$UPLOAD_URL" -d "{\"body\": \"This release always has the latest page files\n\nLast updated: $(git rev-parse --short HEAD)\"}" | |
# Delete old file | |
ASSET_ID=$(curl https://api.github.com/repos/${{ github.repository }}/releases/$ID/assets | jq --raw-output '.[0].id') | |
UPLOAD_URL="https://api.github.com/repos/${{ github.repository }}/releases/assets/$ASSET_ID" | |
curl -XDELETE -H "$AUTH_HEADER" "$UPLOAD_URL" | |
# Upload new file | |
CONTENT_LENGTH="Content-Length: $(stat -c%s pages.7z)" | |
CONTENT_TYPE="Content-Type: application/7z-x-compressed" | |
UPLOAD_URL="https://uploads.github.com/repos/${{ github.repository }}/releases/$ID/assets?name=pages.7z" | |
curl -XPOST -H "$AUTH_HEADER" -H "$CONTENT_LENGTH" -H "$CONTENT_TYPE" --upload-file pages.7z "$UPLOAD_URL" |