Skip to content

Commit

Permalink
Merge pull request #7 from CameronHudson8/ci/deployment
Browse files Browse the repository at this point in the history
ci: try putting both jobs in the same file again
  • Loading branch information
CameronHudson8 authored Jan 1, 2025
2 parents a44a93f + 2e31b38 commit 3fddae6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 41 deletions.
34 changes: 26 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,39 @@
name: main
on:
push:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
deploy:
buildAndUpload:
container:
image: node:20
environment:
name: github-pages
url: ${{ needs.buildAndUpload.outputs.artifactId }}
needs: buildAndUpload
permissions:
pages: write
id-token: write
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache local downloads
uses: actions/cache@v4
with:
path: /github/home/.npm
key: ${{ runner.os }}-npm-packages
- name: Install buildtime dependencies
run: npm ci
- name: Lint
run: npx eslint
- name: Test
run: npm test
- name: Compile
run: npm run build
- name: Upload static files as artifact
uses: actions/upload-artifact@v4
with:
path: ./build/
- name: Deploy to GitHub Pages
id: deployment
if: ${{ github.event_name == 'push' }}
uses: actions/deploy-pages@v4
33 changes: 0 additions & 33 deletions .github/workflows/pr.yml

This file was deleted.

0 comments on commit 3fddae6

Please sign in to comment.