diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c8c2c20f90..f261f2fe2e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,7 +15,7 @@ on: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: - contents: read + contents: write pages: write id-token: write @@ -33,6 +33,36 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: + - name: Checkout the PWA tool repo + uses: actions/checkout@v4 + with: + repository: RainEggplant/noname-pwa + submodules: false + - name: Checkout current repo + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + git clone ${{ github.server_url }}/${{ github.repository }}.git noname + cd noname + - uses: actions/setup-node@v4 + with: + cache: 'yarn' + - name: Generate new `sw.js` for pwa + run: | + yarn install --frozen-lockfile --immutable + node ./node_modules/gulp/bin/gulp.js build + cd noname + git add . + if [ -n "$(git status --porcelain)" ]; then + git commit -m "Update sw.js" + fi + - name: Push to origin + run: | + cd noname + origin_url=$(echo ${{ github.server_url }} | sed "s/https:\/\//https:\/\/${{ github.repository_owner }}:${{ github.token }}@/") + origin_url=$origin_url/${{ github.repository }}.git + git remote set-url origin ${origin_url} + git push origin master - name: Checkout uses: actions/checkout@v4 - name: Setup Pages diff --git a/assets/exit-android.html b/assets/exit-android.html new file mode 100644 index 0000000000..9de95d3c42 --- /dev/null +++ b/assets/exit-android.html @@ -0,0 +1,17 @@ + + + + + + +无名杀 + + + +
+

+ 请按返回键退出 +

+
+ + diff --git a/assets/exit-ios.html b/assets/exit-ios.html new file mode 100644 index 0000000000..e82f973892 --- /dev/null +++ b/assets/exit-ios.html @@ -0,0 +1,17 @@ + + + + + + +无名杀 + + + +
+

+ 已退出 +

+
+ + diff --git a/assets/meta/favicon-dark.png b/assets/meta/favicon-dark.png new file mode 100644 index 0000000000..37d90ea11d Binary files /dev/null and b/assets/meta/favicon-dark.png differ diff --git a/assets/meta/favicon.svg b/assets/meta/favicon.svg new file mode 100644 index 0000000000..457a2223e1 --- /dev/null +++ b/assets/meta/favicon.svg @@ -0,0 +1,15 @@ + + + + + + diff --git a/assets/meta/icon-192.png b/assets/meta/icon-192.png new file mode 100644 index 0000000000..98a8ce2f67 Binary files /dev/null and b/assets/meta/icon-192.png differ diff --git a/assets/meta/icon-512.png b/assets/meta/icon-512.png new file mode 100644 index 0000000000..be6511827d Binary files /dev/null and b/assets/meta/icon-512.png differ diff --git a/index.html b/index.html index 1be6a393ae..68ea79ec9b 100644 --- a/index.html +++ b/index.html @@ -6,6 +6,7 @@ 无名杀 +