Skip to content

Commit

Permalink
👷 镜像部署脚本更新
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronny.Kwok committed Jul 3, 2024
1 parent 20e779c commit 468fede
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 13 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/deploy-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@ on:
push:
branches: [ "main" ]
paths:
- 'packages/docs/**' # 监控的目录
- 'packages/docs/**'
- 'CHANGELOG.md'
- ".github/workflows/deploy-doc.yml"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18.16.0'
registry-url: 'https://registry.npmjs.org'
node-version: '18'

- name: Install and Build
run: |
Expand Down
26 changes: 19 additions & 7 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- "packages/roadbook-api/**"
- "packages/roadbook-vue/**"
- "Dockerfile"
- ".github/workflows/docker-image.yml"


jobs:
Expand All @@ -15,22 +16,33 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for fetch all history

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
- name: Set up Node.js
uses: actions/setup-node@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
node-version: '18'

- name: Bump version
id: bump_version
run: |
npm version patch -m "🔖 release %s"
echo RELEASE=$(cat ./package.json | jq -r .release) >> $GITHUB_ENV
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
npm version patch
echo RELEASE=$(node -p -e "require('./package.json').version") >> $GITHUB_ENV
- name: "Generate Changelog"
uses: sercanuste/gitmoji-changelog-action@v1
with:
commit_message: "📝 Release ${{ env.RELEASE }}"

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & Publish Docker Image
uses: docker/build-push-action@v5
Expand Down
File renamed without changes
5 changes: 2 additions & 3 deletions packages/docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hero:
name: 小肥路书
tagline: 多次旅行经验汇集的路书工具,让你在可视地图的工具下直观的快速安排自己的行程与在旅行中快速导航与查看景点。
image:
src: logo.png
src: /logo.png
alt: 小肥路书
actions:
- theme: brand
Expand All @@ -18,5 +18,4 @@ features:
title: 快速导入点评专辑
- icon: 🗺️
title: 可视化地图快速编排
---

---

0 comments on commit 468fede

Please sign in to comment.