Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
galaxy-dot committed Jul 22, 2024
1 parent 0879d16 commit c72c4ed
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ jobs:
echo "Generated files in public directory:"
ls -la public
# - name: Setup SSH
# uses: webfactory/[email protected]
# with:
# ssh-private-key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
- name: Setup SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.ACTIONS_DEPLOY_KEY }}

# - name: Deploy to GitHub Pages
# run: |
# git config --global init.defaultBranch main
# git config --global user.name "github-actions[bot]"
# git config --global user.email "github-actions[bot]@users.noreply.github.com"
# npx hexo deploy
- name: Deploy to GitHub Pages
run: |
git config --global init.defaultBranch main
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
npx hexo deploy
# Uncomment this step if you want to build the site in a custom directory and push to a branch other than `gh-pages`
# - name: Deploy to custom branch
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ git reset --hard origin/main

### 如何连接 `Travis-CI` 完成自动部署

`Travis-CI` 完成自动部署文件可以参考[官方文档](https://docs.travis-ci.com/user/deployment/pages/),也可以参考这个 repo 里对应的`.travis.yml`文件。注意要修改 branch hexo 到你对应的 branch。
~~`Travis-CI` 完成自动部署文件可以参考[官方文档](https://docs.travis-ci.com/user/deployment/pages/),也可以参考这个 repo 里对应的`.travis.yml`文件。注意要修改 branch hexo 到你对应的 branch。~~

因为我们已经利用的 `travis-ci` 来完成部署,因此可以 comment 掉 blog 根目录下`_config.yml`文件中`# Deployment` 部分。
~~因为我们已经利用的 `travis-ci` 来完成部署,因此可以 comment 掉 blog 根目录下`_config.yml`文件中`# Deployment` 部分。~~

后来 Travis 免费使用到期,无法继续使用,因此我研究了如何用 Github Action 部署,见下一部分。
因为Travis 免费使用到期,无法继续使用,因此我研究了如何用 Github Action 部署,见下一部分。

### 如何连接 `Github Action` 完成自动部署

Expand Down Expand Up @@ -141,7 +141,7 @@ git reset --hard origin/main
- 在repo里`Settings` -> `Pages` -> `Build and deployment` -> `source` 选择 `Deploy from a branch`,默认 branch 名为 `gh-pages`.


### TODO:project 类 ~~travis-ci~~Github Action 设置,等以后用到了再写。
### TODO:project 类 Github Action 设置,等以后用到了再写。

## 各种 feature 设置

Expand Down

0 comments on commit c72c4ed

Please sign in to comment.