-
Notifications
You must be signed in to change notification settings - Fork 14
44 lines (38 loc) · 1.29 KB
/
deploy-documentation.yaml
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
###
#
# Deploy a pre-built documentation to netilfy
#
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
#
###
name: Deploy Documentation Preview to Netlify
on:
workflow_run:
workflows: ['Build Documentation']
types: [completed]
jobs:
deploy:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: swisspost/design-system/.github/actions/setup-pnpm@main
- name: Download build artifacts
uses: ./.github/actions/artifact-download
id: build
with:
name: design-system-documentation
folder: build-output
- name: Deploy documentation to netlify
uses: ./.github/actions/deploy-to-netlify
id: deploy
with:
id: ${{ steps.build.outputs.id }}
netlify_auth_token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
netlify_site_id: ${{ secrets.NEXT_NETLIFY_SITE_ID }}
netlify_site_url: swisspost-design-system-next.netlify.app
folder: ${{ steps.build.outputs.folder }}
comment_token: ${{ secrets.SWISSPOSTDEVS_ACCESS_TOKEN }}
comment_author: swisspost-bot