Skip to content

Commit

Permalink
fix aliyun oss action
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny0826 committed May 23, 2024
1 parent b638d99 commit ab371ba
Showing 1 changed file with 12 additions and 25 deletions.
37 changes: 12 additions & 25 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,41 +25,28 @@ jobs:
- name: Build website
run: yarn build

# - name: Upload Build Artifact
# uses: actions/upload-pages-artifact@v3
# with:
# path: build

# deploy:
# name: Deploy to GitHub Pages
# needs: build

# # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
# permissions:
# pages: write # to deploy to Pages
# id-token: write # to verify the deployment originates from an appropriate source

# # Deploy to the github-pages environment
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}

# runs-on: ubuntu-latest
# steps:
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v4
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: build

deploy:
name: Deploy to AliCloud OSS
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: build

- uses: YangHanlin/oss-deployment-action@v1
with:
oss-endpoint: oss-cn-beijing.aliyuncs.com
oss-accesskey-id: ${{ secrets.ALIYUN_OSS_ACCESSKEY_ID }}
oss-accesskey-secret: ${{ secrets.ALIYUN_OSS_ACCESSKEY_SECRET }}
oss-path: oss://tongsuo-doc/
local-path: build
local-path: ./build
delete-first: true

0 comments on commit ab371ba

Please sign in to comment.