Skip to content

Commit

Permalink
调整笔记结构
Browse files Browse the repository at this point in the history
  • Loading branch information
CatCodeMe committed Mar 23, 2024
1 parent 48b0a0b commit 9ccf838
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
11 changes: 6 additions & 5 deletions 1100_blog_content/others/publish workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ $ git push
> For beginners, you can follow the subsequent steps. If you are familiar with the github action , you can directly refer to and adjust these [notes repo action configuration](https://github.com/CatCodeMe/content_demo/blob/main/.github/workflows/deploy.yml). and [compilation repo action config](https://github.com/CatCodeMe/quartz_demo/blob/v4/.github/workflows/ci.yaml)
#### Configure Notes Repository (content_demo)
1. You can do it directly on GitHub, or if you prefer Git client tools, you can clone it to your local machine for operation. Create a new file (click the `create a new file` blue link above), called `.github/workflows/deploy.yml`.
- **The folder path must be `.github/workflows `, and the file extension must be `.yml`**. The filename doesn't matter as long as it meets GitHub's requirements.
- For `deploy.yml`, you can refer to [deploy.yml](https://github.com/CatCodeMe/content_demo/blob/main/.github/workflows/deploy.yml); after copying and modifying the content, click the `commit` button in the upper right corner to save the current file.
>You can do it directly on GitHub, or if you prefer Git client tools, you can clone it to your local machine for operation.
Create a new file (click the `create a new file` blue link above), called `.github/workflows/deploy.yml`.
- **The folder path must be `.github/workflows `, and the file extension must be `.yml`**. The filename doesn't matter as long as it meets GitHub's requirements.
- For `deploy.yml`, you can refer to [deploy.yml](https://github.com/CatCodeMe/content_demo/blob/main/.github/workflows/deploy.yml); after copying and modifying the content, click the `commit` button in the upper right corner to save the current file.
![20240322-publish_zh_yml.png](img/user/999_repository/20240322-publish_zh_yml.png)
- Replace `repo` option with the name from step 2, structured as `yourname/yourname.github.io`.
- The `token` option is the GitHub authentication token, pay attention when using it.
Expand All @@ -73,7 +75,7 @@ $ git push
5. Click `generate token` (❗️**Copy and save this generated token somewhere else first, as you will need it later**). If you forget, you can redo steps 3-5 to generate a new token.
6. After copying it, you can refresh the page or click the left navigation bar again to enter the `Fine grained tokens` page, select and click on the token you just generated, and you will see something similar to the screenshot below.
![20240324-publish_token_settings.png](img/user/999_repository/20240324-publish_token_settings.png)
1. Go back to the homepage of the repository `content_demo`, click the `settings` tab, enter the settings page, and add the authorization of the token you just generated to the current repository. Click `New repository secret` button.
7. Go back to the homepage of the repository `content_demo`, click the `settings` tab, enter the settings page, and add the authorization of the token you just generated to the current repository. Click `New repository secret` button.
![20240322-publish_add_token_repo.png](img/user/999_repository/20240322-publish_add_token_repo.png)
8. Add TokenNext, add the token, **pay attention to**:
1. The `Name` **must be consistent with the `gh_action_token_PAT` name in step 1**. Of course, if you are using a different name, just modify the configuration of `.github/workflows/deploy.yml` to match the `Name` here.
Expand All @@ -82,7 +84,6 @@ $ git push
![20240322-publish_add_token_repo_2.png](img/user/999_repository/20240322-publish_add_token_repo_2.png)
9. Once this is done, the actions for the current repository should be configured. At this point, the repository structure should look like this:
![20240322-publish_content_repo_demo.png](img/user/999_repository/20240322-publish_content_repo_demo.png)

#### Configure Quartz Compilation Repository
1. Go back to the `quartz_demo` repository and directly modify the `ci.yaml` file content after cloning the original repository (quartz).
1. Like the notes repository, this file must also be in the `.github/workflows/` folder, with no specific name requirements.
Expand Down
5 changes: 3 additions & 2 deletions 1100_blog_content/others/博客发布流程.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ $ git push
### 配置Github action实现自动编译
> 对于新手可以参考后续的步骤, 熟悉操作的话可以直接参考并调整这个[action配置](https://github.com/CatCodeMe/blog_from_obsidian/blob/main/.github/workflows/deploy.yml)
#### 配置笔记库(content_demo)
1. 可以直接在github, 如果喜欢git客户端工具也可以clone到本地再操作。新建一个文件(点击上图的`create a new file`蓝色链接即可), 叫`.github/workflows/deploy.yml`
> 可以直接在github, 如果喜欢git客户端工具也可以clone到本地再操作。
新建一个文件(点击上图的`create a new file`蓝色链接即可), 叫`.github/workflows/deploy.yml`
- **文件夹路径必须是 `.github/workflows `, 文件后缀必须是`.yml`**, 文件名没有要求,只要符合github要求即可
- `deploy.yml` 的文件内容,可以参考这里 [deploy.yml](https://github.com/CatCodeMe/content_demo/blob/main/.github/workflows/deploy.yml) ;复制并修改好内容后,点击右上角的`commit` 按钮,即可保存当前文件
![20240322-publish_zh_yml.png](img/user/999_repository/20240322-publish_zh_yml.png)
Expand All @@ -68,7 +70,6 @@ $ git push
5. 点击 `generate token`,(❗️**先复制并保存这个生成的token到其他地方,后续需要使用**. 如果忘记了,可以重新执行上边的3步,再生成一个新token即可)
6. 复制好之后可以刷新或者再次点击左侧导航栏进入`Fine grained tokens` 页面,选择并点击刚才的生成token,可以看到类似下图的效果
![20240324-publish_token_settings.png](img/user/999_repository/20240324-publish_token_settings.png)
7. 回到刚才生成的仓库`content_demo`首页, 点击 `settings` 选项卡,进入设置页面,为当前仓库添加刚才生成的token授权, 点击`New repository secret`按钮
![20240322-publish_add_token_repo.png](img/user/999_repository/20240322-publish_add_token_repo.png)
8. 接下来添加token, **需要注意**
Expand Down

0 comments on commit 9ccf838

Please sign in to comment.