-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from CameronHudson8/ci/deployment
ci: try putting both jobs in the same file again
- Loading branch information
Showing
2 changed files
with
26 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.