Skip to content

update build action #60

update build action

update build action #60

Workflow file for this run

name: Github Pages
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Build with pnpm
run: |
pnpm install
pnpm run pages
tar \
--dereference --hard-dereference \
--directory dist \
-cvf ${{ runner.temp }}/artifact.tar \
--exclude=.git \
--exclude=.github \
.
- name: Upload artifact
uses: actions/upload-artifact@main
with:
name: github-pages
path: ${{ runner.temp }}/artifact.tar
retention-days: 1
- name: Deploy GitHub Pages site
uses: actions/[email protected]
with:
artifact_name: github-pages