Skip to content

chore(deps): lock file maintenance (#142) #172

chore(deps): lock file maintenance (#142)

chore(deps): lock file maintenance (#142) #172

name: publish-gh-pages
on:
push:
branches:
- "main"
permissions:
contents: read
pages: write
id-token: write
jobs:
run-frontend-test:
uses: ./.github/workflows/run-frontend-test.yml
build:
needs: [run-frontend-test]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
- name: Repo Visualizer
uses: githubocto/[email protected]
with:
output_file: "public/visualized-repo.svg"
should_push: false
excluded_paths: ".github,.vscode,icon,public,pnpm-lock.yaml,src-tauri/icons,node_modules"
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16
- name: Install pnpm
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist
# Deploy job
deploy:
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