You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2
-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
1
+
# Workflow for publishing the students' website along with additional helpful information
3
2
4
-
name: Node.js CI
3
+
name: Deploy main branch as website
5
4
6
5
on:
7
6
push:
8
7
branches: [main]
9
8
10
-
jobs:
11
-
build:
12
-
runs-on: ubuntu-latest
9
+
# Allows you to run this workflow manually from the Actions tab
10
+
workflow_dispatch:
11
+
12
+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13
+
permissions:
14
+
contents: read
15
+
pages: write
16
+
id-token: write
13
17
14
-
strategy:
15
-
matrix:
16
-
node-version: [16.x]
17
-
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
18
+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19
+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20
+
concurrency:
21
+
group: "pages"
22
+
cancel-in-progress: false
18
23
24
+
jobs:
25
+
checkout:
26
+
runs-on: ubuntu-latest
19
27
steps:
20
-
- uses: actions/checkout@v2
28
+
- name: Checkout
29
+
uses: actions/checkout@v4
30
+
with:
31
+
fetch-depth: 0
21
32
- name: Use Node.js ${{ matrix.node-version }}
22
-
uses: actions/setup-node@v2
33
+
uses: actions/setup-node@v3
23
34
with:
24
35
node-version: ${{ matrix.node-version }}
25
-
cache: "npm"
26
36
- id: get-repo-values
37
+
name: Get repository values
27
38
run: |
28
39
url=https://$(echo "${{github.repository}}" | sed "s/\//.github.io\//")
29
40
echo "url=$url" >> $GITHUB_OUTPUT
@@ -33,20 +44,142 @@ jobs:
33
44
file: package.json
34
45
field: homepage
35
46
value: ${{ steps.get-repo-values.outputs.url }}
36
-
- run: npm ci
37
-
- run: npm run lint
38
-
- run: npm run test -- --coverage |& tee ./public/test_report.txt
0 commit comments