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 f7c04a0
Showing 1 changed file with 32 additions and 6 deletions.
38 changes: 32 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@ run-name: ${{ github.actor }} is running main branch tests 🚀

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

env:
CI: true

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

jobs:
test:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
Expand All @@ -23,17 +27,39 @@ jobs:
run: npx playwright install --with-deps chromium
- name: Build
run: npm run build
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: dist
name: github-pages
path: dist/
retention-days: 1
- name: Run Unit Tests
run: npm run test:unit:coverage
- name: Run E2e Tests
run: npm run test:e2e
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
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@v4
with:
name: github-pages
path: dist/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
with:
artifact_name: github-pages
timeout: 300000

0 comments on commit f7c04a0

Please sign in to comment.