github-pages #13
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: github-pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "main" | |
schedule: | |
- cron: "00 08 * * *" # Every day at 8:00 UTC (17:00 JST) | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
slides: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up uv | |
shell: bash | |
run: pipx install uv | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.13 | |
- name: Generate slides | |
shell: bash | |
run: | | |
make install-deps-dev | |
make slides | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "lts/*" | |
- name: Setup @antfu/ni | |
run: npm i -g @antfu/ni | |
- name: Install dependencies | |
run: | | |
cd docs | |
nci | |
nr build --base /${{github.event.repository.name}}/ | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- uses: actions/upload-pages-artifact@v3 | |
with: | |
path: docs/dist | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
needs: slides | |
runs-on: ubuntu-latest | |
name: Deploy | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |