1
0
mirror of https://github.com/morris/vanilla-todo.git synced 2025-01-17 12:48:15 +01:00

add deployment to github pages

This commit is contained in:
Morris Brodersen 2023-12-02 12:19:31 +01:00
parent d592febdeb
commit f38899e46d
3 changed files with 43 additions and 22 deletions

View File

@ -1,22 +0,0 @@
name: Checks
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run format-check
- run: npm run lint
- run: npm run lint-styles
- run: npm run dev &
- run: npx playwright install --with-deps
- run: npm run test-coverage
env:
CI: true

42
.github/workflows/pipeline.yml vendored Normal file
View File

@ -0,0 +1,42 @@
name: Pipeline
on:
push:
branches: ['main']
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run format-check
- run: npm run lint
- run: npm run lint-styles
- run: npm run dev &
- run: npx playwright install --with-deps
- run: npm run test-coverage
env:
CI: true
deploy:
needs: checks
permissions:
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/configure-pages@v3
- uses: actions/upload-pages-artifact@v2
with:
path: public
- id: deployment
uses: actions/deploy-pages@v2

View File

@ -910,6 +910,7 @@ Thanks!
### 12/2023
- Added GitHub action for running checks and deployment
- Edited closing section
- Updated numbers