Aipages (#264) #8
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
name: Upload to OSS | |
on: | |
# Runs on pushes targeting the default branch | |
push: | |
branches: ["develop-astro-sca"] | |
jobs: | |
upload-to-oss: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
registry-url: https://registry.npmjs.org/ | |
- name: Install And Build | |
run: npm i && npm run build | |
- name: Install ossutil | |
run: | | |
curl -L http://gosspublic.alicdn.com/ossutil/1.7.0/ossutil64 -o /tmp/ossutil64 | |
chmod +x /tmp/ossutil64 | |
/tmp/ossutil64 config -e https://oss-cn-hangzhou.aliyuncs.com -i ${{ secrets.ALIYUN_ACCESS_KEY_ID }} -k ${{ secrets.ALIYUN_ACCESS_KEY_SECRET }} -L CH | |
- name: Upload to OSS | |
run: | | |
/tmp/ossutil64 cp -r -f ./dist/ oss://${{ secrets.OSS_BUCKET }}/ |