chore :trigger site action #695
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: site sync | |
on: | |
push: | |
branches: [main] | |
paths: | |
- .github/workflows/site.yml | |
- site/** | |
- CHANGELOG.md | |
# repository_dispatch: | |
# types: [update-hooks-docs] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm install | |
- run: npm run build --if-present | |
- name: action-zip | |
uses: montudor/[email protected] | |
- name: install docusaurus | |
run: cd site & npm i & npm run build | |
- name: Zip output | |
run: zip -r build/document_archive.zip docs i18n blog versioned_docs versioned_sidebars | |
working-directory: site | |
- name: upload files to OSS | |
uses: fangbinwei/aliyun-oss-website-action@v1 | |
with: | |
accessKeyId: ${{ secrets.DEPLOY_SITE_ACCESS_KEY_ID }} | |
accessKeySecret: ${{ secrets.DEPLOY_SITE_ACCESS_KEY_SECRET }} | |
bucket: midway-next-site-hk | |
# use your own endpoint | |
endpoint: oss-cn-hongkong.aliyuncs.com | |
folder: site/build |