Release v4.1.50 #25
Workflow file for this run
This file contains hidden or 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: Deploy to Aliyun OSS | |
| on: | |
| release: | |
| types: | |
| - published | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Get yarn cache directory path | |
| id: yarn-cache-dir-path | |
| run: echo "::set-output name=dir::$(yarn cache dir)" | |
| - uses: actions/cache@v3 | |
| id: yarn-cache | |
| with: | |
| path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-yarn- | |
| - name: Use Node.js | |
| uses: actions/setup-node@v1 | |
| with: | |
| node-version: '16' | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Build storybook | |
| run: yarn storybook:build | |
| - name: Configure Aliyun CLI | |
| run: | | |
| wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz | |
| tar xzvf aliyun-cli-linux-latest-amd64.tgz | |
| sudo mv aliyun /usr/local/bin/ | |
| - name: Deploy to Aliyun OSS | |
| env: | |
| ALIYUN_ACCESS_KEY_ID: ${{ secrets.ALIYUN_ACCESS_KEY_ID }} | |
| ALIYUN_ACCESS_KEY_SECRET: ${{ secrets.ALIYUN_ACCESS_KEY_SECRET }} | |
| run: | | |
| aliyun configure set --mode AK --region ${{ secrets.ALIYUN_REGION }} --access-key-id ${{ secrets.ALIYUN_ACCESS_KEY_ID }} --access-key-secret ${{ secrets.ALIYUN_ACCESS_KEY_SECRET }} | |
| aliyun oss rm oss://${{ secrets.ALIYUN_OSS_BUCKET }}/ -r -f | |
| aliyun oss cp .out oss://${{ secrets.ALIYUN_OSS_BUCKET }}/ -r -f |