2 Star 79 Fork 12

ylb/gitee-pages-action

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.py 1.03 KB
一键复制 编辑 原始数据 按行查看 历史
ylb 提交于 2022-08-17 14:52 +08:00 . chore: update script and readme guideline
from actions_toolkit import core
from app import log
from app.action import Action
author = {
'name': 'Yang Libin',
'link': 'https://github.com/yanglbme'
}
marketplace = 'https://github.com/marketplace/actions/gitee-pages-action'
log.info(f'Welcome to use Gitee Pages Action ❤\n\n'
f'📕 Getting Started Guide: {marketplace}\n'
f'📣 Maintained by {author["name"]}: {author["link"]}\n')
try:
username = core.get_input('gitee-username', required=True)
password = core.get_input('gitee-password', required=True)
repo = core.get_input('gitee-repo', required=True)
branch = core.get_input('branch')
directory = core.get_input('directory')
https = core.get_input('https')
action = Action(username, password, repo, branch, directory, https)
action.login()
log.info('Login successfully')
action.rebuild_pages()
log.info('Rebuild Gitee Pages successfully')
log.info('Success, thanks for using @yanglbme/gitee-pages-action!')
except Exception as e:
log.set_failed(str(e))
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/yanglbme/gitee-pages-action.git
git@gitee.com:yanglbme/gitee-pages-action.git
yanglbme
gitee-pages-action
gitee-pages-action
main

搜索帮助