Skip to content

Commit

Permalink
add(ci): migrate to GitHub Actions CI
Browse files Browse the repository at this point in the history
  • Loading branch information
baobao1270 committed Apr 2, 2024
1 parent c2462b3 commit b36069c
Show file tree
Hide file tree
Showing 4 changed files with 414 additions and 675 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy

on:
push:
workflow_dispatch:

permissions:
contents: read

env:
PROJECT: yayingongyu
S3_DOMAIN: cos.accelerate.myqcloud.com
S3_BUCKET: luotianyi-dev-1251131545
S3_PREFIX: web/host

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install Dependencies
run: pip install git+https://github.com/luotianyi-dev/deploykit.git
- name: Upload to DeployKit
run: deployctl deploy upload --commit ${{ github.sha }} -f html public -f server.conf server.conf --switch
env:
API_KEY: ${{ secrets.API_KEY }}
- name: Upload to S3
run: deployctl s3 --bucket $S3_BUCKET --prefix $S3_PREFIX/$PROJECT -f assets
env:
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}
S3_ENDPOINT: https://${{ env.S3_DOMAIN }}
working-directory: ./html
Loading

0 comments on commit b36069c

Please sign in to comment.