Build Vue3 Docs #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Vue3 Docs | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2 | |
with: | |
version: 7.27.0 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
cache: 'pnpm' | |
- name: Build | |
run: | | |
pnpm i | |
pnpm run docs:build | |
- name: Upload GitHub Pages artifact | |
uses: actions/upload-pages-artifact@v3.0.1 | |
with: | |
# Artifact name | |
name: github-pages | |
# Path of the directory containing the static assets. | |
path: docs/.vuepress/dist | |
# Duration after which artifact will expire in days. | |
retention-days: 1 | |
# Deploy job | |
deploy: | |
# Add a dependency to the build job | |
needs: build | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
# Specify runner + deployment step | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |