fix aliyun
This commit is contained in:
14
.github/workflows/deploy-1000h-portal-aliyun.yml
vendored
14
.github/workflows/deploy-1000h-portal-aliyun.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Deploy 1000h portal (aliyun)
|
||||
name: Deploy 1000h portal (aliyun)
|
||||
|
||||
env:
|
||||
OSS_ENDPOINT: oss-cn-beijing.aliyuncs.com
|
||||
@@ -31,10 +31,15 @@ jobs:
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
|
||||
|
||||
- name: Setup node env
|
||||
uses: actions/setup-node@master
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "20"
|
||||
|
||||
# Debugging installation issues
|
||||
- name: Show npm logs if install fails
|
||||
if: failure()
|
||||
run: cat /home/runner/.npm/_logs/* || true
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install
|
||||
|
||||
@@ -44,6 +49,9 @@ jobs:
|
||||
- name: Build
|
||||
run: yarn portal:generate
|
||||
|
||||
- name: Install Wrangler manually (workaround)
|
||||
run: npm install -g wrangler@3.81.0
|
||||
|
||||
- uses: manyuanrong/setup-ossutil@v2.0
|
||||
with:
|
||||
endpoint: ${{ env.OSS_ENDPOINT }}
|
||||
@@ -51,4 +59,4 @@ jobs:
|
||||
access-key-secret: ${{ secrets.GLOBAL_OSS_ACCESS_KEY_SECRET }}
|
||||
- run: ossutil cp -r -u -f 1000h-portal/.output/public ${{ secrets.ALIYUN_OSS_PORTAL_URL }} --include "*" --exclude "*.html" -e ${{ env.OSS_ENDPOINT }}
|
||||
- run: ossutil cp -r -u -f 1000h-portal/.output/public/index.html ${{ secrets.ALIYUN_OSS_PORTAL_URL }} -e ${{ env.OSS_ENDPOINT }}
|
||||
- run: ossutil set-meta ${{ secrets.ALIYUN_OSS_PORTAL_URL }}/ Cache-Control:no-cache --include "*.html" -r -f --update -e ${{ env.OSS_ENDPOINT }}
|
||||
- run: ossutil set-meta ${{ secrets.ALIYUN_OSS_PORTAL_URL }}/ Cache-Control:no-cache --include "*.html" -r -f --update -e ${{ env.OSS_ENDPOINT }}
|
||||
|
||||
Reference in New Issue
Block a user