Skip to content

Commit

Permalink
Merge pull request #422 from moonbitlang/zhiyuan/llm-action
Browse files Browse the repository at this point in the history
add upload llm action
  • Loading branch information
bzy-debug authored Jan 15, 2025
2 parents 52c4443 + e70d00b commit 93e86a0
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/llm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: upload llm.txt

on:
workflow_dispatch:

defaults:
run:
working-directory: next

jobs:
llm-upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: aliyun/setup-aliyun-cli-action@v1
- name: upload
env:
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
AWS_DEFAULT_REGION: ${{secrets.AWS_DEFAULT_REGION}}
run: |
echo 'soyo' > llm.txt
aliyun configure set --profile default --mode AK --access-key-id ${{secrets.ALIBABA_CLOUD_ACCESS_KEY_ID}} --access-key-secret ${{secrets.ALIBABA_CLOUD_ACCESS_KEY_SECRET}} --region ${{secrets.ALIBABA_REGION}}
echo y | aliyun oss cp llm.txt ${{secrets.ALIYUN_HOMEPAGE_BUCKET}}/llm.txt
aliyun cdn RefreshObjectCaches --ObjectPath https://www.moonbitlang.cn/llm.txt --ObjectType File
aws s3 cp llm.txt ${{secrets.AWS_HOMEPAGE_BUCKET}}/llm.txt
aws cloudfront create-invalidation --distribution-id ${{secrets.AWS_CLOUDFRONT_HOMEPAGE_DISTRIBUTION_ID}} --paths "/llm.txt"

0 comments on commit 93e86a0

Please sign in to comment.