mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 14:13:37 +08:00
ci: update site-deploy.yml (#39312)
* ci: add doc-site workflow * ci: Add Manual Trigger Action * ci: update site-deploy.yml Modify trigger events Add Surge Deployment Add Deployment Success Comment function * Revert "ci: Add Manual Trigger Action" This reverts commit5bd75d1e58
. * Revert "ci: add doc-site workflow" This reverts commitec7e7e40e7
. * ci: update ci config
This commit is contained in:
parent
cccbab7c6d
commit
a8a9607bd6
22
.github/workflows/site-deploy.yml
vendored
22
.github/workflows/site-deploy.yml
vendored
@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
name: Deploy website
|
name: Deploy website
|
||||||
on:
|
on:
|
||||||
create
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@ -10,7 +11,7 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
setup:
|
setup:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event.ref_type == 'tag' && (contains(github.event.ref, '-') == false)
|
if: startsWith(github.ref, 'refs/tags/') && (contains(github.ref_name, '-') == false)
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -63,9 +64,24 @@ jobs:
|
|||||||
- name: build
|
- name: build
|
||||||
run: npm run predeploy
|
run: npm run predeploy
|
||||||
|
|
||||||
- name: deploy
|
- name: Get version
|
||||||
|
id: publish-version
|
||||||
|
run: echo "VERSION=$(echo ${{ github.ref_name }} | sed 's/\./-/g')" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./_site
|
publish_dir: ./_site
|
||||||
force_orphan: true
|
force_orphan: true
|
||||||
|
|
||||||
|
- name: Deploy to Surge (with TAG)
|
||||||
|
run: |
|
||||||
|
export DEPLOY_DOMAIN=ant-design-${{ steps.publish-version.outputs.VERSION }}.surge.sh
|
||||||
|
npx surge --project ./_site --domain $DEPLOY_DOMAIN --token ${{ secrets.SURGE_TOKEN }}
|
||||||
|
|
||||||
|
- name: Create Commit Comment
|
||||||
|
uses: peter-evans/commit-comment@v1
|
||||||
|
with:
|
||||||
|
body: |
|
||||||
|
Doc site for this release: https://ant-design-${{ steps.publish-version.outputs.VERSION }}.surge.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user