Deploy Documentation Preview #1677
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
### | |
# | |
# 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@v3 | |
- name: Setup | |
uses: swisspost/design-system/.github/actions/setup-pnpm@main | |
- name: Download build artifacts | |
uses: swisspost/design-system/.github/actions/artifact-download@main | |
id: build | |
with: | |
name: design-system-documentation | |
folder: build-output | |
- name: Deploy documentation to netlify | |
uses: swisspost/design-system/.github/actions/deploy-to-netlify@main | |
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 |