Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/LICENCE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
HabitatCalc © 2024 by Ulysse Boucherie is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
HabitatCalc © 2025 by Ulysse Boucherie is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
33 changes: 12 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,18 @@ concurrency:
cancel-in-progress: false

jobs:
# Analyze code for security
analyze:
name: Analyze for ${{matrix.os}}
# Will analyse code for each language x os
runs-on: ${{matrix.os}}
name: Analyze for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
# If `fail-fast: true`, GitHub will cancel all in-progress and queued jobs in the matrix if any job in the matrix fails
fail-fast: false # If `fail-fast: true`, GitHub will cancel in-progress and queued jobs in the matrix if any fails
matrix:
os: [ubuntu-latest]

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -43,46 +40,40 @@ jobs:
queries: security-extended
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# Test with npm the /tests/**.test.js files
test:
name: Test with ${{matrix.node-versions}}
needs: analyze
name: Test with node-${{matrix.node-version}}
strategy:
matrix:
node-versions: ['16', 'latest']
node-version: ['16', 'latest']
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-versions }}

node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install

- name: Run tests
run: npm test

# Build and deploy site to GitHub Pages
deploy:
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '.'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4