Skip to content

fix(deploy): update deployment workflow to use GH_PERSONAL_TOKEN inst… #3

fix(deploy): update deployment workflow to use GH_PERSONAL_TOKEN inst…

fix(deploy): update deployment workflow to use GH_PERSONAL_TOKEN inst… #3

Workflow file for this run

name: Deploy to Pages
# To see the workflow clearer, I try to deploy first to a branch and then publish it.
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
deployments: write
concurrency:
group: 'pages'
cancel-in-progress: true
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 8
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'pnpm'
- name: Install dependencies
run: pnpm i
- name: Build page
run: pnpm docs:build
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GH_PERSONAL_TOKEN }}
publish_dir: ./content/.vitepress/dist
publish_branch: deploy
destination_dir: ./.