Added mdns for the cod.m coordinator #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build β and Deploy π | |
on: [push, pull_request] | |
concurrency: | |
group: ${{ github.ref }} | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout π | |
uses: actions/checkout@v4 | |
- name: Setup Node.js β | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Determine node version β | |
id: node-version | |
run: | | |
echo "::set-output name=version::$(node -v)" | |
- name: Restore Cache π¦ | |
uses: actions/cache@v4 | |
id: cache | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ steps.node-version.outputs.version }}-${{ hashFiles('package-lock.json') }} | |
- name: Install dependencies π | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: npm ci | |
# - name: Set DEVELOP_BRANCH env var | |
# if: github.ref == 'refs/heads/develop' | |
# run: | | |
# echo "DEVELOP_BRANCH=yes" >> $GITHUB_ENV | |
- name: Build π | |
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' | |
run: npm run build | |
- name: Run tests π©Ί | |
run: npm run test | |
- name: Add build.txt π | |
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' | |
run: | | |
git log --pretty=format:'%h' -n 1 > dist/build.txt | |
echo >> dist/build.txt | |
date +%F_%T >> dist/build.txt | |
- name: Deploy π | |
if: github.ref == 'refs/heads/master' | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: dist # The folder the action should deploy. | |
single-commit: true | |
clean: true | |
# clean-exclude: | | |
# develop | |
# - name: Deploy to /develop π | |
# if: github.ref == 'refs/heads/develop' | |
# uses: JamesIves/[email protected] | |
# with: | |
# branch: gh-pages | |
# folder: dist | |
# target-folder: develop | |
# single-commit: true | |
# clean: true |