feat: fix content #26
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: Build and Commit PDF and PPTX | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'src/**' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'src/**' | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
lfs: true | |
- name: Set up Git LFS | |
run: git lfs install | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
cache-dependency-path: 'package-lock.json' | |
- name: Install dependencies | |
run: npm install | |
- name: Install Chrome | |
uses: browser-actions/setup-chrome@v1 | |
with: | |
chrome-version: 'latest' | |
- name: Build PDF | |
run: npm run build:pdf | |
- name: Build PPTX | |
run: npm run build:pptx | |
- name: Commit and push changes | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add -A . | |
git commit -m "PDF & PPTX generated by github actions" | |
git push origin HEAD:${{ github.head_ref }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |