-
-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #381 from EvanNotFound/dev
v2.6.3
- Loading branch information
Showing
59 changed files
with
252 additions
and
321 deletions.
There are no files selected for viewing
28 changes: 7 additions & 21 deletions
28
.github/workflows/aliyun_cdn.yml → .github/workflows/aliyun-cdn-publish.yml
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 |
---|---|---|
@@ -1,46 +1,32 @@ | ||
# workflow 名称,执行时的标题 | ||
name: Publish to Aliyun | ||
|
||
# 触发条件 | ||
on: | ||
release: | ||
types: [published] | ||
|
||
# 不清楚干嘛的,保留着 | ||
workflow_dispatch: | ||
|
||
# 真正的任务 | ||
jobs: | ||
# job 名称 | ||
build: | ||
# 运行环境 | ||
aliyun-cdn-publish: | ||
runs-on: ubuntu-latest | ||
|
||
# 步骤 | ||
# 1. checkout repo | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
# 2. 配置 node | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
|
||
# 3. OSS 脚本相关配置 | ||
- name: Setup Aliyun OSS | ||
uses: manyuanrong/setup-ossutil@master | ||
with: | ||
endpoint: ${{ secrets.ALI_ENDPOINT }} | ||
access-key-id: ${{ secrets.ALI_ACCESSKEYID }} | ||
access-key-secret: ${{ secrets.ALI_ACCESSKEYSECRET }} | ||
|
||
# 4. 执行 OSS 脚本,ossutil 用法 `https://help.aliyun.com/document_detail/50452.html` | ||
|
||
- name: Upload to Aliyun OSS | ||
# run: ossutil cp -r source/ oss://${{ secrets.ALI_BUCKET }}/projects/hexo-theme-redefine/${{ github.event.release.name }}/source/ | ||
run: | | ||
VERSION=$(echo ${{ github.event.release.name }} | sed 's/v//') # Remove the 'v' prefix from the release name | ||
VERSION=$(echo ${{ github.event.release.name }} | sed 's/v//') | ||
ossutil cp -r source/ oss://${{ secrets.ALI_BUCKET }}/projects/hexo-theme-redefine@$VERSION/source/ | ||
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
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
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 |
---|---|---|
|
@@ -9,17 +9,17 @@ on: | |
- main | ||
|
||
jobs: | ||
Deploy-Production: | ||
production-deployment: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout theme repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
path: 'theme' # Checkout the theme repository into a directory named 'theme' | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' # Specify your required Node.js version | ||
|
||
|
@@ -42,21 +42,9 @@ jobs: | |
npm uninstall hexo-theme-redefine | ||
npm run build | ||
# - name: Install Vercel CLI | ||
# run: npm install --global vercel@canary | ||
|
||
- name: Change directory to hexo-site | ||
run: echo "HEXO_SITE_DIR=${{ github.workspace }}/hexo-site" >> $GITHUB_ENV | ||
|
||
# - uses: amondnet/vercel-action@v20 #deploy | ||
# with: | ||
# vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required | ||
# vercel-org-id: ${{ secrets.VERCEL_ORG_ID}} #Required | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} #Optional | ||
# vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}} #Required | ||
# working-directory: ${{ env.HEXO_SITE_DIR }} | ||
|
||
- name: Deploy to Vercel Action | ||
uses: EvanNotFound/[email protected] | ||
with: | ||
|
@@ -69,16 +57,3 @@ jobs: | |
PRODUCTION: true | ||
DEPLOY_PR_FROM_FORK: true | ||
PR_PREVIEW_DOMAIN: "redefine-preview-pr-{PR}.vercel.app" | ||
|
||
|
||
# - name: Pull Vercel Environment Information | ||
# run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | ||
# working-directory: ${{ env.HEXO_SITE_DIR }} | ||
|
||
# - name: Build Project Artifacts | ||
# run: vercel build --token=${{ secrets.VERCEL_TOKEN }} | ||
# working-directory: ${{ env.HEXO_SITE_DIR }} | ||
|
||
# - name: Deploy Project Artifacts to Vercel | ||
# run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | ||
# working-directory: ${{ env.HEXO_SITE_DIR }} |
File renamed without changes.
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
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
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
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
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
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
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
Oops, something went wrong.