Skip to content

Commit

Permalink
Figure out how to do GH Actions?
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaslongfell committed Dec 12, 2024
1 parent ae716f1 commit cc53d34
Show file tree
Hide file tree
Showing 3 changed files with 341 additions and 50 deletions.
39 changes: 8 additions & 31 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,26 @@
name: Deploy
name: Deploy to GitHub Pages

on:
push:
branches:
- main

jobs:
build:
name: Build
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3

- name: Install dependencies
uses: bahmutov/npm-install@v1
run: npm install

- name: Build project
- name: Build Vite project
run: npm run build

- name: Upload production-ready build files
uses: actions/upload-artifact@v3
with:
name: production-files
path: ./dist

deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'

steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: production-files
path: ./dist

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
uses: gh-pages/deploy@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
deploy_branch: main
build_dir: dist
Loading

0 comments on commit cc53d34

Please sign in to comment.