Skip to content

Commit

Permalink
github pages deploy added
Browse files Browse the repository at this point in the history
  • Loading branch information
olesni committed Dec 14, 2023
1 parent 94e7853 commit dca49df
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 6 deletions.
52 changes: 47 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
name: Main Branch
run-name: ${{ github.actor }} is running main branch tests 🚀
run-name: ${{ github.actor }} is running main branch checks and deploy 🚀

on:
push:
branches: [main]
branches: [main, EO-28/deploy-to-github-pages]

env:
CI: true

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

jobs:
test:
build:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
Expand All @@ -19,21 +23,59 @@ jobs:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: Build
run: npm run build
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist/
retention-days: 1
test:
needs: build
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Run Unit Tests
run: npm run test:unit:coverage
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: Download the build artifacts
uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Run E2e Tests
run: npm run test:e2e
- uses: actions/upload-artifact@v3
with:
name: playwright-report
path: playwright-report/
retention-days: 1
deploy:
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download the build artifacts
uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
with:
artifact_name: dist
timeout: 300000
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OpenAPI editor</title>
</head>
Expand Down

0 comments on commit dca49df

Please sign in to comment.