Skip to content

Commit

Permalink
Deploy to GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
“云云” committed Jan 19, 2024
1 parent 412bb9c commit c16f8a8
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 4 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy to GitHub Pages

on:
# 每次推送到 `main` 分支时触发这个“工作流程”
# 如果你使用了别的分支名,请按需将 `main` 替换成你的分支名
push:
branches: [main]
# 允许你在 GitHub 上的 Actions 标签中手动触发此“工作流程”
workflow_dispatch:

# 允许 job 克隆 repo 并创建一个 page deployment
permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v3
- name: Install, build, and upload your site
uses: withastro/action@v1
# with:
# path: . # 存储库中 Astro 项目的根位置。(可选)
# node-version: 18 # 用于构建站点的特定 Node.js 版本,默认为 18。(可选)
# package-manager: pnpm@latest # 应使用哪个 Node.js 包管理器来安装依赖项和构建站点。会根据存储库中的 lockfile 自动检测。(可选)

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ Github:
知乎:
微信公众号:

- [第 01 期 - Web 情报局](https://markyun.github.io/posts/01-Web情报局)
- [第 01 期 - Web 情报局](https://webcia-weekly.vercel.app/posts/1-Web%E6%83%85%E6%8A%A5%E5%B1%80)
2 changes: 2 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,6 @@ export default defineConfig({
markdown: {
remarkPlugins: [defaultLayoutPlugin],
},
site: "https://webcia-weekly.github.io",
base: "/Weekly",
});
6 changes: 3 additions & 3 deletions src/layouts/post.astro
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,10 @@ if (postIndex < allPosts.length) {
</div>
<script
src="https://giscus.app/client.js"
data-repo={'markyun/markyun.github.io' || SITE.repo}
data-repo-id="R_kgDOKyM4fA"
data-repo={'markyun/Weekly'}
data-repo-id="R_kgDOLHCyFg"
data-category="General"
data-category-id="DIC_kwDOKyM4fM4CbSGO"
data-category-id="DIC_kwDOLHCyFs4Cci0n"
data-mapping="title"
data-strict="0"
data-reactions-enabled="1"
Expand Down

0 comments on commit c16f8a8

Please sign in to comment.