Skip to content

Update Slides_KDP_React_Workshop.md #135

Update Slides_KDP_React_Workshop.md

Update Slides_KDP_React_Workshop.md #135

Workflow file for this run

name: Build and Deploy
on: [push]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
if: ${{ contains(github.event.head_commit.message, 'Upload') }}
steps:
- name: Checkout 🛎️
uses: actions/[email protected]
- name: Set env
run: |
echo "slide=$(echo '${{ github.event.head_commit.message }}' | cut -d' ' -f 2)" >> $GITHUB_ENV
- name: Install and Build 🔧
run: |
echo ${{ env.slide }}
npm install
npm run build -- ${{ env.slide }}.md --base /Talks/${{ env.slide }}/
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: dist # The folder the action should deploy.
target-folder: ${{ env.slide }}
clean: false
- name: Checkout for README 🛎️
uses: actions/[email protected]
- name: Update README
run: |
echo "| [${{ env.slide }}](${{ env.slide }}.md) | <https://ahandsel.github.io/Talks/${{ env.slide }}/> |" >> README.md
- name: Commit README changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "readme: add ${{ env.slide }} link"
file_pattern: README.md