-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add(ci): migrate to GitHub Actions CI
- Loading branch information
1 parent
c2462b3
commit b36069c
Showing
4 changed files
with
414 additions
and
675 deletions.
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,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 |
Oops, something went wrong.