Skip to content

Commit

Permalink
chore: Update deployment workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheraff committed Jun 2, 2024
1 parent 2cf22df commit e32f4cd
Showing 1 changed file with 25 additions and 13 deletions.
38 changes: 25 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
name: πŸ™ Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
Expand All @@ -24,43 +24,55 @@ jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
- name: πŸ”± Checkout
uses: actions/checkout@v4
- name: Set up Node
with:
fetch-depth: 1

- name: βš™οΈ Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
- name: Set up pnpm

- name: βš™οΈ Set up pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Get pnpm store directory

- name: πŸ“ Get pnpm store directory
shell: bash
id: get-store-path
run: |
echo "store-path=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
- name: πŸ“¦ Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.get-store-path.outputs.store-path }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
- name: 🧰 Install dependencies
run: pnpm i --frozen-lockfile
- name: Build
run: pnpm build
- name: Setup Pages

- name: πŸ—οΈ Build
timeout-minutes: 1
run: pnpm build --base ${{ github.event.repository.name }}

- name: βš™οΈ Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact

- name: β›΅ Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload dist folder
path: "./dist"
- name: Deploy to GitHub Pages

- name: πŸ¦‹ Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit e32f4cd

Please sign in to comment.