-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci add artifacts build/upload for cloudflare
- Loading branch information
1 parent
a6e146f
commit 60d677c
Showing
2 changed files
with
48 additions
and
2 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 |
---|---|---|
|
@@ -10,7 +10,7 @@ permissions: | |
contents: write | ||
|
||
jobs: | ||
deploy-gh-pages: | ||
pre-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 拉源码 | ||
|
@@ -44,7 +44,20 @@ jobs: | |
node-version: 18 | ||
cache: pnpm | ||
|
||
cloudflare-geekery_cn-pre-build: | ||
runs-on: ubuntu-latest | ||
needs: pre-build | ||
steps: | ||
- name: modify | ||
run: |- | ||
sed -i "s/hostname: "https:\/\/paper-dragon.github.io",/hostname: "https:\/\/www.geekery.cn",/g" src/.vuepress/theme.ts | ||
grep hostname src/.vuepress/theme.ts | ||
build-github-pages: | ||
runs-on: ubuntu-latest | ||
needs: pre-build | ||
steps: | ||
- name: 构建文档 | ||
env: | ||
NODE_OPTIONS: --max_old_space_size=8192 | ||
|
@@ -60,13 +73,45 @@ jobs: | |
# 产物保留时间 | ||
retention-days: 3 | ||
|
||
build-geekery_cn-pages: | ||
runs-on: ubuntu-latest | ||
needs: build-github-pages | ||
steps: | ||
- name: 构建文档 | ||
env: | ||
NODE_OPTIONS: --max_old_space_size=8192 | ||
run: |- | ||
pnpm run docs:build | ||
> src/.vuepress/dist/.nojekyll | ||
- name: 上传构建产物 | ||
uses: actions/[email protected] | ||
with: | ||
name: geekery_cn-artifacts-html | ||
path: src/.vuepress/dist/ | ||
# 产物保留时间 | ||
retention-days: 3 | ||
|
||
deploy-github-page: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 部署文档 | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
# 这是文档部署到的分支名称 | ||
branch: gh-pages | ||
folder: src/.vuepress/dist | ||
|
||
deploy-cloudflare-geekery_cn-page: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 部署文档 | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
# 这是文档部署到的分支名称 | ||
branch: geekery_cn-pages | ||
folder: src/.vuepress/dist | ||
|
||
publish-docker: | ||
runs-on: ubuntu-latest | ||
needs: deploy-gh-pages | ||
|
@@ -99,6 +144,7 @@ jobs: | |
file: ./Dockerfile | ||
push: true | ||
tags: ${{ vars.DOCKERHUB_USERNAME }}/notebook:${{ env.TAGDATE }} | ||
|
||
deploy-hosted: | ||
runs-on: self-hosted | ||
needs: deploy-gh-pages | ||
|
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