Skip to content

Commit 40381a6

Browse files
committed
feat: improve
1 parent 25784b7 commit 40381a6

File tree

2 files changed

+51
-51
lines changed

2 files changed

+51
-51
lines changed

.github/workflows/docker-image.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ jobs:
2828
- name: Fetch default.conf
2929
uses: valitydev/action-download-file@v1
3030
with:
31-
url: https://raw.githubusercontent.com/lcxfs1991/docschina-deployment/main/webpack4/default.conf
31+
url: https://raw.githubusercontent.com/lcxfs1991/docschina-deployment/main/webpack5/default.conf
3232
target-path: .
3333

3434
- name: Fetch Dockerfile
3535
uses: valitydev/action-download-file@v1
3636
with:
37-
url: https://raw.githubusercontent.com/lcxfs1991/docschina-deployment/main/webpack4/Dockerfile
37+
url: https://raw.githubusercontent.com/lcxfs1991/docschina-deployment/main/webpack5/Dockerfile
3838
target-path: .
3939

4040

@@ -57,13 +57,13 @@ jobs:
5757
context: .
5858
push: true
5959
platforms: linux/amd64
60-
tags: ccr.ccs.tencentyun.com/docschina/webpack4:${{ env.BRANCH_NAME }}-${{ env.TIMESTAMP }}
60+
tags: ccr.ccs.tencentyun.com/docschina/webpack5:${{ env.BRANCH_NAME }}-${{ env.TIMESTAMP }}
6161

6262
- name: Deployment
6363
uses: TencentCloud/cli-action@v1
6464
with:
6565
secret_id: ${{ secrets.SECRET_ID }}
6666
secret_key: ${{ secrets.SECRET_KEY }}
6767
region: ${{ secrets.LIGHTHOUSE_REGION }}
68-
commands: tat InvokeCommand --cli-unfold-argument --region ap-shanghai --CommandId cmd-boc4aaiw --InstanceIds lhins-nkwfootc --Parameters '{"deployment":"webpack4","image":"ccr.ccs.tencentyun.com/docschina/webpack4:${{ env.BRANCH_NAME }}-${{ env.TIMESTAMP }}"}'
68+
commands: tat InvokeCommand --cli-unfold-argument --region ap-shanghai --CommandId cmd-boc4aaiw --InstanceIds lhins-nkwfootc --Parameters '{"deployment":"webpack5","image":"ccr.ccs.tencentyun.com/docschina/webpack5:${{ env.BRANCH_NAME }}-${{ env.TIMESTAMP }}"}'
6969
output_format: json

.github/workflows/main.yml

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
1-
# # This file should modified carefully.
2-
3-
# name: CI
4-
5-
# # Controls when the action will run. Triggers the workflow on push or pull request
6-
# # events but only for the master branch
7-
# on:
8-
# push:
9-
# branches: [cn]
10-
11-
# # A workflow run is made up of one or more jobs that can run sequentially or in parallel
12-
# jobs:
13-
# # This workflow contains a single job called "build"
14-
# build:
15-
# # The type of runner that the job will run on
16-
# runs-on: ubuntu-latest
17-
18-
# # Steps represent a sequence of tasks that will be executed as part of the job
19-
# steps:
20-
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
21-
# - uses: actions/checkout@v2
22-
23-
# - name: Install
24-
# run: |
25-
# yarn
26-
# yarn clean
27-
28-
# - name: Build
29-
# run: |
30-
# yarn build
31-
32-
# - name: Check Build
33-
# run: |
34-
# sudo -i
35-
# sudo chown -R $USER ./dist
36-
37-
# - name: Docschina Github Action
38-
# id: deployStatic
39-
# uses: lcxfs1991/docschina-actions@master
40-
# with:
41-
# skipFiles: ${{ secrets.SKIP_FILES }}
42-
# secretId: ${{ secrets.SECRET_ID }}
43-
# secretKey: ${{ secrets.SECRET_KEY }}
44-
# staticSrcPath: ./dist
45-
# bucket: ${{ secrets.BUCKET }}
46-
# region: ${{ secrets.REGION }}
47-
# forceFiles: ${{ secrets.FORCE_FILES }}
1+
# This file should modified carefully.
2+
3+
name: CI
4+
5+
# Controls when the action will run. Triggers the workflow on push or pull request
6+
# events but only for the master branch
7+
on:
8+
push:
9+
branches: []
10+
11+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
12+
jobs:
13+
# This workflow contains a single job called "build"
14+
build:
15+
# The type of runner that the job will run on
16+
runs-on: ubuntu-latest
17+
18+
# Steps represent a sequence of tasks that will be executed as part of the job
19+
steps:
20+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
21+
- uses: actions/checkout@v2
22+
23+
- name: Install
24+
run: |
25+
yarn
26+
yarn clean
27+
28+
- name: Build
29+
run: |
30+
yarn build
31+
32+
- name: Check Build
33+
run: |
34+
sudo -i
35+
sudo chown -R $USER ./dist
36+
37+
- name: Docschina Github Action
38+
id: deployStatic
39+
uses: lcxfs1991/docschina-actions@master
40+
with:
41+
skipFiles: ${{ secrets.SKIP_FILES }}
42+
secretId: ${{ secrets.SECRET_ID }}
43+
secretKey: ${{ secrets.SECRET_KEY }}
44+
staticSrcPath: ./dist
45+
bucket: ${{ secrets.BUCKET }}
46+
region: ${{ secrets.REGION }}
47+
forceFiles: ${{ secrets.FORCE_FILES }}

0 commit comments

Comments
 (0)