Skip to content

Commit

Permalink
Figure it out harder
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaslongfell committed Dec 12, 2024
1 parent cc53d34 commit b549dfe
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 18 deletions.
59 changes: 43 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,52 @@ name: Deploy to GitHub Pages

on:
push:
branches:
- main
branches: ["main"]

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: true

jobs:
deploy:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install dependencies
run: npm install

- name: Build Vite project
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22.11"
cache: 'npm'

- name: Install Dependencies
run: npm ci

- name: Build React App
run: npm run build

- name: Deploy to GitHub Pages
uses: gh-pages/deploy@v1
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
deploy_branch: main
build_dir: dist
path: ./dist

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Loading

0 comments on commit b549dfe

Please sign in to comment.