SAP AEM Integration workshop - Day 3 #474
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
name: Netlify Preview Builder | |
on: | |
pull_request_target: | |
branches: [ master ] | |
jobs: | |
Build_Preview: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout site repo | |
uses: actions/checkout@v2 | |
with: | |
repository: SolaceDev/solace-dev-codelabs-site | |
submodules: recursive | |
- name: Install node 12.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 12.16.2 | |
- name: Checkout PR | |
run: cd site/solace-dev-codelabs && git fetch origin pull/${{ github.event.pull_request.number }}/head:temp && git checkout temp | |
- name: build site | |
run: cd site && npm i && npm run dist | |
- name: Netlify Deploy | |
uses: nwtgck/[email protected] | |
with: | |
publish-dir: './site/dist' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} |