Skip to content

Commit

Permalink
ci: add deploy action
Browse files Browse the repository at this point in the history
  • Loading branch information
easterNday committed Jun 26, 2023
1 parent a62e71a commit 825b49e
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Deploy
on:
workflow_dispatch: {}
push:
branches:
- main
permissions:
contents: write
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup pnpm ⚡️
uses: pnpm/action-setup@v2
with:
version: 8

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"

- name: Install dependencies ⚡️
run: pnpm install --frozen-lockfile

- name: Build 🛠️
run: pnpm docs:build

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ArbitrarilyTong/.vitepress/dist
branch: gh-pages

0 comments on commit 825b49e

Please sign in to comment.