forked from meshery-extensions/shape-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.34 KB
/
Copy pathpreview-site.yml
File metadata and controls
49 lines (42 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Deploy Preview
on:
workflow_run:
workflows:
- Build and Preview Site
types:
- completed
jobs:
deploy-preview:
if: github.repository == 'meshery-extensions/shape-builder'
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Download Site dir
uses: actions/download-artifact@v6
with:
name: public-dir
github-token: ${{ secrets.RELEASE_NOTES_PATN }}
repository: ${{ github.event.workflow_run.repository.full_name }}
run-id: ${{ github.event.workflow_run.id }}
- name: Unzip Site
run: |
rm -rf ./docs/_site
unzip public-dir.zip
rm -f public-dir.zip
- name: Deploy to Netlify
id: netlify
uses: nwtgck/actions-netlify@v3
with:
publish-dir: 'docs/_site'
production-deploy: false
github-token: ${{ secrets.RELEASE_NOTES_PATN }}
enable-commit-comment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
- name: Comment Deploy URL
uses: ./.github/actions/comment-preview-on-pr
with:
token: ${{ secrets.RELEASE_NOTES_PATN }}
deploy_url: "${{ steps.netlify.outputs.deploy-url }}"