Skip to content

Update gtat config

Update gtat config #16

Workflow file for this run

name: πŸš€ CD | ⚑️ VitePress
on:
push:
branches:
- gh-pages
paths-ignore:
- README.md
- LICENSE.md
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
pages: write
contents: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
cleanup:
name: 🧹 Clean up GitHub repo
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: πŸ—‘ Delete deployment
uses: strumwolf/delete-deployment-environment@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment: github-pages
onlyRemoveDeployments: true
- name: πŸ—‘ Delete workflow runs
uses: dmvict/clean-workflow-runs@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
save_period: 7
save_min_runs_number: 1
branch: gh-pages
build:
name: πŸ—οΈ Build
needs: cleanup
runs-on: ubuntu-latest
steps:
- name: πŸ›ŽοΈ Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 🟧 Setup pnpm
uses: pnpm/action-setup@v4
- name: ❇️ Setup Node.js
uses: actions/setup-node@v4
timeout-minutes: 5
with:
cache: pnpm
node-version: 20.x
- name: πŸ“¦ Install dependencies
env:
PNPM_FLAGS: --frozen-lockfile --color=always
run: pnpm i ${{ env.PNPM_FLAGS }}
- name: ⚑️ Build site with VitePress
run: pnpm notes:build
env:
VITE_GTAG: ${{ vars.VITE_GTAG }}
- name: πŸ“€ Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist
name: dist
deploy:
name: 🌐 Deploy
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: πŸš€ Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: dist