Skip to content

修改 blog 示例,使用 security、jwt 来实现认证功能 #152

修改 blog 示例,使用 security、jwt 来实现认证功能

修改 blog 示例,使用 security、jwt 来实现认证功能 #152

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Build 🔧
uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- run: |
npm install
npm run build
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install coscmd
run: |
pip install coscmd
- name: Deploy CN 🚀
env:
COS_BUCKET_NAME: malagu-hk-1300141256
COS_BUCKET_LOCATION: ap-hongkong
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 3
retry_on: error
command: |
coscmd config -a ${{secrets.COS_SECRET_ID}} -s ${{secrets.COS_SECRET_KEY}} -b ${COS_BUCKET_NAME} -r ${COS_BUCKET_LOCATION} -m 10
coscmd upload -r ./dist/ /
- name: Deploy EN 🚀
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist