-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
90 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM python:3.7-slim | ||
|
||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
RUN pip install --upgrade --no-cache-dir requests | ||
|
||
COPY "entrypoint.sh" "/entrypoint.sh" | ||
RUN chmod +x /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,45 @@ | ||
# gitee-pages-action | ||
# Gitee Pages action | ||
使用模拟登录,自动部署 Gitee Pages。 | ||
|
||
> 未完成。 | ||
## 入参 | ||
|
||
| 参数 | 描述 | 是否必传 | 默认值 | | ||
|---|---|---|---| | ||
| `gitee-repo` | Gitee 仓库 | 是 | - | | ||
| `gitee-login-cookie` | Gitee 登录后的 cookie | 是 | - | | ||
| `branch` | 构建的分支 | 否 | `master` | | ||
| `directory` | 构建的目录 | 否 | '' | | ||
| `https` | 是否强制 HTTPS | 否 | `false` | | ||
|
||
## 例子 | ||
```yml | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Sync to Gitee | ||
uses: wearerequired/git-mirror-action@master | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }} | ||
with: | ||
source-repo: "[email protected]:doocs/advanced-java.git" | ||
destination-repo: "[email protected]:Doocs/advanced-java.git" | ||
|
||
- name: Rebuild Gitee Pages | ||
uses: yanglbme/[email protected] | ||
with: | ||
repository: doocs/advanced-java | ||
cookie: ${{ secrets.GITEE_COOKIE }} | ||
branch: master | ||
``` | ||
请到 `Settings` -> `Secrets` 配置 `GITEE_RSA_PRIVATE_KEY` 和 `GITEE_COOKIE`。其中: | ||
|
||
- `GITEE_RSA_PRIVATE_KEY`: 存放你的 `id_rsa` 私钥。 | ||
- `GITEE_COOKIE`: 存放你登录 Gitee 后的 Cookie。 | ||
|
||
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: 'Gitee Pages Action' | ||
description: 'GitHub Action for Gitee Pages' | ||
author: 'yanglbme' | ||
branding: | ||
icon: 'git-branch' | ||
color: 'gray-dark' | ||
inputs: | ||
gitee-repo: | ||
description: 'The Gitee repository, like doocs/leetcode' | ||
required: true | ||
gitee-login-cookie: | ||
description: 'The Gitee login cookie, like gitee-session-n=BAh7CUkiD...' | ||
required: true | ||
branch: | ||
description: 'Which branch to build' | ||
required: false | ||
default: 'master' | ||
directory: | ||
description: 'Which directory to build' | ||
required: false | ||
default: '' | ||
https: | ||
description: 'Use force https or not' | ||
required: false | ||
default: true | ||
outputs: | ||
result: | ||
description: 'The result of api' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh -l | ||
|
||
echo "Hello $1" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.