-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adding tests to ci * use npm ci for package installation * also install dev dependencies * try npm install as npm ci is failing * npm instead of npx * coverage enabled * installing missing dependency
- Loading branch information
1 parent
5771c08
commit 8983e86
Showing
6 changed files
with
508 additions
and
56 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,60 +1,33 @@ | ||
# File: .github/workflows/publish.yml | ||
# TODO: Add setup to run tests and linting in ci | ||
name: publish-to-github-pages | ||
name: Deploy to dokploy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
env: | ||
NODE_ENV: production | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: 'pages' | ||
cancel-in-progress: false | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
run-test: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js ⚙️ - Cache dependencies ⚡ - Install dependencies 🔧 | ||
uses: ./.github/workflows/setup-node | ||
with: | ||
working-directory: longpost | ||
node-env: ${{ env.NODE_ENV }} | ||
|
||
- name: Setup Pages ⚙️ | ||
uses: actions/configure-pages@v4 | ||
with: | ||
static_site_generator: next | ||
|
||
- name: Build with Next.js 🏗️ | ||
run: npx next build | ||
working-directory: longpost | ||
|
||
- name: Upload artifact 📡 | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: longpost/out | ||
|
||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
runs-on: ubuntu-latest | ||
needs: build | ||
|
||
steps: | ||
- name: Publish to GitHub Pages 🚀 | ||
id: deployment | ||
uses: actions/deploy-pages@v4 | ||
node-env: development | ||
- name: Run unit tests | ||
run: npm run test:unit -- --coverage.enabled=true | ||
- name: Run playwrite tests | ||
run: npm run test:e2e | ||
- name: Report converage | ||
if: always() | ||
uses: davelosert/vitest-coverage-report-action@v2 |
Empty file.
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
Oops, something went wrong.