Skip to content

chore: update urls

chore: update urls #6

Workflow file for this run

name: Deploy Aliyun oss
# Controls when the workflow will run
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Notify the build step is starting
uses: hasura/comment-progress@v2.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
commit-sha: ${{ github.sha }}
id: comment-progress
recreate: true
message: 'Starting deployment of this pull request...'
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@master
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: Resolve Dependencies
run: |
npm i -g pnpm
pnpm i
# https://help.aliyun.com/document_detail/120072.htm
- name: Setup Aliyun OSS CLI
run: |
wget https://gosspublic.alicdn.com/ossutil/1.7.11/ossutil64
chmod 755 ossutil64
cp ./ossutil64 /usr/local/bin/
ossutil64 config -e https://oss-cn-hangzhou.aliyuncs.com -i ${{ secrets.ALIYUN_ACCESS_KEY_ID }} -k ${{ secrets.ALIYUN_ACCESS_KEY_SECRET }}
- name: Run build script
run: |
pnpm build
- name: Upload Production
run: |
ossutil64 cp -r -u dist/ oss://www-epb-wiki/
- name: Notify that the build was successful
uses: hasura/comment-progress@v2.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
commit-sha: ${{ github.sha }}
id: comment-progress
recreate: true
message: |
Successfully deployed to the following URLs:
## Live URLs
- https://www.epb.wiki/
## OSS Management Panel
- https://oss.console.aliyun.com/bucket/oss-cn-hangzhou/www-epb-wiki/object
- name: Notify that the build was failed
if: ${{ failure() }}
uses: hasura/comment-progress@v2.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
commit-sha: ${{ github.sha }}
id: comment-progress
message: ':x: Some errors occurred during the build process'
append: true