mirror of
https://github.com/doocs/md.git
synced 2024-11-28 13:36:32 +08:00
chore: update preview workflow (#98)
This commit is contained in:
parent
aa11cd951e
commit
c29c0957e0
4
.github/workflows/preview-build.yml
vendored
4
.github/workflows/preview-build.yml
vendored
@ -25,11 +25,11 @@ jobs:
|
|||||||
path: dist
|
path: dist
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
|
|
||||||
- name: Save PR number
|
- name: save PR number
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
run: echo ${{ github.event.number }} > ./pr-id.txt
|
run: echo ${{ github.event.number }} > ./pr-id.txt
|
||||||
|
|
||||||
- name: Upload PR number
|
- name: upload PR number
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
|
8
.github/workflows/preview-deploy.yml
vendored
8
.github/workflows/preview-deploy.yml
vendored
@ -11,7 +11,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
|
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
|
||||||
steps:
|
steps:
|
||||||
- name: download pr artifact
|
- name: download PR artifact
|
||||||
uses: dawidd6/action-download-artifact@v2
|
uses: dawidd6/action-download-artifact@v2
|
||||||
with:
|
with:
|
||||||
workflow: ${{ github.event.workflow_run.workflow_id }}
|
workflow: ${{ github.event.workflow_run.workflow_id }}
|
||||||
@ -35,7 +35,7 @@ jobs:
|
|||||||
npx surge --project ./ --domain $DEPLOY_DOMAIN --token ${{ secrets.SURGE_TOKEN }}
|
npx surge --project ./ --domain $DEPLOY_DOMAIN --token ${{ secrets.SURGE_TOKEN }}
|
||||||
|
|
||||||
- name: update status comment
|
- name: update status comment
|
||||||
uses: actions-cool/maintain-one-comment@v1.1.0
|
uses: actions-cool/maintain-one-comment@v2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
body: |
|
body: |
|
||||||
@ -49,7 +49,7 @@ jobs:
|
|||||||
|
|
||||||
- name: The job failed
|
- name: The job failed
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
uses: actions-cool/maintain-one-comment@v1.1.0
|
uses: actions-cool/maintain-one-comment@v2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
body: |
|
body: |
|
||||||
@ -65,7 +65,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'failure'
|
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'failure'
|
||||||
steps:
|
steps:
|
||||||
- name: download pr artifact
|
- name: download PR artifact
|
||||||
uses: dawidd6/action-download-artifact@v2
|
uses: dawidd6/action-download-artifact@v2
|
||||||
with:
|
with:
|
||||||
workflow: ${{ github.event.workflow_run.workflow_id }}
|
workflow: ${{ github.event.workflow_run.workflow_id }}
|
||||||
|
Loading…
Reference in New Issue
Block a user