Skip to content

Merge pull request #146 from localgod/dependabot/npm_and_yarn/slidev/… #240

Merge pull request #146 from localgod/dependabot/npm_and_yarn/slidev/…

Merge pull request #146 from localgod/dependabot/npm_and_yarn/slidev/… #240

Workflow file for this run

name: Main
on:
push:
branches:
- master
- 'feature/**'
- 'releases/**'
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm install
- name: build
run: npm run build_github_pages
- name: Save dist
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: presentation
persist-credentials: false
fetch-depth: 0
- name: Commit files
run: |
rm -rf assets
rm -f index.html
- uses: actions/download-artifact@v4
with:
name: dist
path: ./
- name: list dir
run: ls -la ./
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add -A
git commit -m "Updated presentation report"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: presentation