Skip to content

Commit

Permalink
chore: build and deploy to Github Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
bludnic committed Dec 3, 2024
1 parent d00b25c commit 727cdd2
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 3 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/github-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Simple workflow for deploying static content to GitHub Pages
name: Build & Deploy to Github Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]

# 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:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build-and-deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest
steps:
- name: Checkout ๐Ÿ›Ž๏ธ
uses: actions/checkout@v3

- name: Configure GitHub Pages ๐Ÿ“„
uses: actions/configure-pages@v2

- name: Install and Build ๐Ÿ› ๏ธ
run: |
npm ci
npm run build
- name: Upload artifacts ๐Ÿ“
uses: actions/upload-pages-artifact@v1
with:
path: .vitepress/dist

- name: Deploy to GitHub Pages ๐Ÿš€
id: deployment
uses: actions/deploy-pages@v1
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"scripts": {
"docs:dev": "vitepress dev",
"docs:build": "vitepress build",
"docs:preview": "vitepress preview"
"dev": "vitepress dev",
"build": "vitepress build",
"preview": "vitepress preview"
},
"devDependencies": {
"vitepress": "^1.5.0"
Expand Down

0 comments on commit 727cdd2

Please sign in to comment.