Skip to content

Devcontainer doc (#11) #5

Devcontainer doc (#11)

Devcontainer doc (#11) #5

Workflow file for this run

name: Release slidev
on:
push:
branches-ignore:
- "*"
tags:
- "*"
concurrency: release-slidev
jobs:
release:
permissions:
contents: write
pages: read
runs-on: ubuntu-latest
steps:
- name: Setup Pages
id: configure-pages
uses: actions/configure-pages@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
- run: npm ci
- name: Export slidev as PDF
run: npm run export --slide=${GITHUB_REF##*/} && npm run export:dark --slide=${GITHUB_REF##*/}
- uses: softprops/action-gh-release@v1
with:
files: |
dist/*.pdf
- name: Check if OGP is enabled
id: checkOGP
uses: ./.github/actions/checkOGP
with:
file: ${GITHUB_REF##*/}/slides.md
- name: Generate index.html before building SPA
if: ${{ steps.checkOGP.outputs.ogp == 'true' }}
run: |
npm run build:before --slide=${GITHUB_REF##*/} --pagesurl=${{ steps.configure-pages.outputs.base_url }}
- name: Build slidev as SPA
run: npm run build --slide=${GITHUB_REF##*/}
- name: Generate preview image for OGP
if: ${{ steps.checkOGP.outputs.ogp == 'true' }}
run: |
npm run build:after --slide=${GITHUB_REF##*/}
- name: Deploy pages
uses: crazy-max/ghaction-github-pages@v3
with:
keep_history: true
build_dir: docs
verbose: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
update:
needs: release
permissions:
contents: write
uses: ./.github/workflows/update-index-page.yaml
secrets: inherit