Skip to content

Commit

Permalink
chore: 改变部署时检查 secret 的时机
Browse files Browse the repository at this point in the history
  • Loading branch information
chen310 committed Mar 12, 2022
1 parent d1af8e8 commit dd5e718
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ jobs:
name: Deploy to Tencent Cloud Serverless Cloud Function
runs-on: ubuntu-latest
steps:
- name: Check tencent secret
run: |
if [ -z "${{ secrets.SECRET_ID }}" ] || [ -z "${{ secrets.SECRET_KEY }}" ]; then
echo "请配置 SECRET_ID 和 SECRET_KEY 两个 secrets"
echo -e "\033[1;31m部署失败 \033[0m"
exit 1
fi
- name: Clone local repository
uses: actions/checkout@v2
- name: Set up Python 3.6
Expand Down
5 changes: 0 additions & 5 deletions serverless/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
if [ -z "$TENCENT_SECRET_ID" ] || [ -z "$TENCENT_SECRET_KEY" ]; then
echo "请配置 SECRET_ID 和 SECRET_KEY 两个 secrets"
echo -e "\033[1;31m部署失败 \033[0m"
exit 1
fi
# 复制模板文件为配置文件
cp config.example.json config.json
url=$(python serverless/geturl.py)
Expand Down

0 comments on commit dd5e718

Please sign in to comment.