-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatically update and publish to GitHub pages using GitHub actions (…
…#18) Hello, I have upgraded uglify-es to uglify-js, and added the feature of using GitHub actions to automatically update and publish to GitHub pages. Here are the specific changes: - Add GitHub actions to publish on GitHub pages; - Change uglify-es to uglify-js; - When building, download uglify-js from GitHub releases instead of git; - When publishing, use CDN(`registry.npmmirror.com`) instead of local files for uglify-js; Update steps: 1. On the GitHub actions page, manually run workflow `update` to build and publish to the gh-pages branch; 2. Let GitHub pages use gh-pages branch; ![image](https://github.com/user-attachments/assets/892d2b99-104c-41f0-8cbd-0b059592a227) ![image](https://github.com/user-attachments/assets/2a8e9ae9-4911-4023-a111-6f42795a7fc5)
- Loading branch information
Showing
4 changed files
with
39 additions
and
41 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: GitHub Pages | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
|
||
if: github.actor == github.repository_owner | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
steps: | ||
- uses: actions/checkout@main | ||
- name: update | ||
run: bash build/update.sh | ||
# Deploy the site | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: public | ||
force_orphan: true |
This file was deleted.
Oops, something went wrong.
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
Submodule uglify
deleted from
aebc91