Skip to content

Commit

Permalink
ci: surge
Browse files Browse the repository at this point in the history
  • Loading branch information
D-Sketon committed Aug 24, 2024
1 parent 6200719 commit c98c35a
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/surge.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Deploy to Surge

on:
Expand Down Expand Up @@ -32,11 +31,26 @@ jobs:
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: '18'
node-version: "18"

- name: Deploy to Surge
run: |
cd reimu-playground
npm install
npx hexo generate
npx surge --project ./public --domain ${{ secrets.SURGE_DOMAIN }} --token ${{ secrets.SURGE_TOKEN }}
npx surge --project ./public --domain ${{ secrets.SURGE_DOMAIN }} --token ${{ secrets.SURGE_TOKEN }}
- name: Send GitHub Bot Notification
if: success()
uses: actions/github-script@v6
with:
script: |
const surgeDomain = process.env.SURGE_DOMAIN;
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: `🚀 已经部署在 [${surgeDomain}](${surgeDomain})`
});
env:
SURGE_DOMAIN: ${{ secrets.SURGE_DOMAIN }}

0 comments on commit c98c35a

Please sign in to comment.