2023-07-18 14:52:34 +02:00
|
|
|
name: Deploy
|
2023-07-18 15:55:23 +02:00
|
|
|
|
2023-07-18 14:52:34 +02:00
|
|
|
on:
|
|
|
|
workflow_dispatch: {}
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- v3-vitepress
|
2023-07-18 15:55:23 +02:00
|
|
|
|
|
|
|
env:
|
2023-07-19 18:45:27 +02:00
|
|
|
VITE_BASE: /kodo/
|
2023-08-08 20:06:00 +02:00
|
|
|
VITE_HOSTNAME: https://xhenos.github.io
|
2023-07-18 15:55:23 +02:00
|
|
|
|
2023-07-18 14:52:34 +02:00
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-latest
|
2023-07-26 00:48:43 +02:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: "website"
|
2023-07-19 18:45:27 +02:00
|
|
|
|
2023-07-18 14:52:34 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pages: write
|
|
|
|
id-token: write
|
2023-07-19 18:45:27 +02:00
|
|
|
|
2023-07-18 14:52:34 +02:00
|
|
|
environment:
|
|
|
|
name: github-pages
|
|
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
2023-07-19 18:45:27 +02:00
|
|
|
|
2023-07-18 14:52:34 +02:00
|
|
|
steps:
|
2023-07-19 18:45:27 +02:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
2023-07-18 14:52:34 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2023-07-19 18:45:27 +02:00
|
|
|
|
2023-08-08 21:05:58 +02:00
|
|
|
- name: Setup Pnpm
|
|
|
|
uses: pnpm/action-setup@v2
|
|
|
|
|
2023-07-19 18:45:27 +02:00
|
|
|
- name: Setup Node
|
|
|
|
uses: actions/setup-node@v3
|
2023-07-18 14:52:34 +02:00
|
|
|
with:
|
2023-08-08 20:06:00 +02:00
|
|
|
node-version: 18
|
2023-08-08 20:39:38 +02:00
|
|
|
cache: pnpm
|
2023-07-26 00:48:43 +02:00
|
|
|
cache-dependency-path: "**/package-lock.json"
|
2023-07-19 18:45:27 +02:00
|
|
|
|
|
|
|
- name: Install and build
|
2023-08-08 20:39:38 +02:00
|
|
|
run: pnpm install && pnpm build
|
2023-07-19 18:45:27 +02:00
|
|
|
|
|
|
|
- name: Configure pages
|
|
|
|
uses: actions/configure-pages@v2
|
|
|
|
|
|
|
|
- name: Upload pages artifact
|
|
|
|
uses: actions/upload-pages-artifact@v1
|
2023-07-18 14:52:34 +02:00
|
|
|
with:
|
2023-07-26 00:48:43 +02:00
|
|
|
path: website/src/.vitepress/dist
|
2023-07-19 18:45:27 +02:00
|
|
|
|
2023-07-18 14:52:34 +02:00
|
|
|
- name: Deploy
|
|
|
|
id: deployment
|
|
|
|
uses: actions/deploy-pages@v1
|