fix: update emoji in footer and add Open Graph meta tags to enhance SEO #52
This file contains hidden or 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
| # https://gist.github.com/KermanX/27461e8694f5d5b00c3817dbed15f39f | |
| name: Export | |
| on: | |
| push: | |
| branches: [main] | |
| # pull_request: | |
| # branches: | |
| # - main | |
| workflow_dispatch: | |
| jobs: | |
| export: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| # Cache node_modules | |
| - name: Cache node modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| **/node_modules | |
| key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install playwright browsers | |
| run: npx playwright install chromium --with-deps | |
| - name: Create Export Directory | |
| run: mkdir -p ./_export | |
| - name: Export | |
| run: | | |
| npm exec slidev export -- --format pdf --output ./_export/javascript-note.pdf | |
| # npm exec slidev export -- --format pptx --output ./_export/javascript-note.pptx | |
| - name: Generate Body | |
| run: | | |
| echo -e "## Welcome to the resource download section\n### Please download the class note in PDF or PPTX (just pictures in png) files from the assets section below"\n Best of Luck and may the fourth be with you. > ./_export/body.txt | |
| # Disable Git hooks before the action | |
| - name: Disable pre-push hook | |
| run: mv .git/hooks/pre-push .git/hooks/pre-push.bak || true | |
| - name: Create Tag | |
| uses: rickstaa/action-create-tag@v1.7.2 | |
| with: | |
| tag: export-${{ github.sha }} | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: Exports for ${{ github.sha }} | |
| body_path: ./_export/body.txt | |
| tag_name: export-${{ github.sha }} | |
| make_latest: true | |
| files: | | |
| ./_export/javascript-note.pdf | |
| ./_export/javascript-note.pptx | |
| # Re-enable Git hooks after the action | |
| - name: Re-enable pre-push hook | |
| run: mv .git/hooks/pre-push.bak .git/hooks/pre-push || true |