Skip to content

Update Melting Pot references in documentation #11

Update Melting Pot references in documentation

Update Melting Pot references in documentation #11

name: Upload Exported Slidev to HomePage
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
paths:
- "slidev/**.pdf"
- ".github/workflows/slidev-homepage.yml"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Default values for the inputs to this workflow
env:
SLIDEV_PATH: slidev
SLIDE_PATH: pub/slide
jobs:
upload:
runs-on: ubuntu-latest
environment: homepage
env:
SLIDE_PATH: ${{ vars.SLIDE_PATH }}
steps:
- name: Clone local repository
uses: actions/checkout@v4
with:
path: slidev
- name: Clone target repository
uses: actions/checkout@v4
with:
repository: ${{ vars.HOMEPAGE_REPO }}
token: ${{ secrets.GH_PAT }}
path: homepage
- name: Copy exported slidev to target repository
run: cp slidev/$SLIDEV_PATH/*.pdf homepage/$SLIDE_PATH
- name: Commit and push changes
run: |
cd homepage
git config user.name ${{ github.repository }}
git config user.email ${{ github.repository.owner }}@outlook.com
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to commit"
exit 0
fi
git add .
git commit -m "Update slide"
git push