diff --git a/.github/workflows/deploy.yml b/.github/workflows/docs.yml similarity index 76% rename from .github/workflows/deploy.yml rename to .github/workflows/docs.yml index fb01b9e1..5b23cf93 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/docs.yml @@ -1,17 +1,14 @@ -name: Deploy VitePress site to Pages +name: Deploy VitePress site on: - workflow_dispatch: + push: + branches: [main] permissions: contents: read pages: write id-token: write -concurrency: - group: pages - cancel-in-progress: false - jobs: build: runs-on: ubuntu-latest @@ -19,22 +16,28 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - fetch-depth: 0 + fetch-depth: 0 # Not needed if lastUpdated is not enabled + - name: Setup Node uses: actions/setup-node@v4 with: node-version: 20 - cache: npm + - name: Setup Pages uses: actions/configure-pages@v4 + - name: Install dependencies run: npm ci + working-directory: docs + - name: Build with VitePress - run: npm run docs:build + run: npm run build:docs + working-directory: docs + - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: - path: docs/.vitepress/dist + path: docs/dist deploy: environment: