Skip to content

Merge pull request #190 from HerrZatacke/dependabot/npm_and_yarn/mult… #199

Merge pull request #190 from HerrZatacke/dependabot/npm_and_yarn/mult…

Merge pull request #190 from HerrZatacke/dependabot/npm_and_yarn/mult… #199

Workflow file for this run

name: Build 🧱 and Deploy 🛳
on:
push:
branches: [ master ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 💳
uses: actions/[email protected]
- name: Setup node 💻
uses: actions/[email protected]
with:
node-version: '20.x'
- name: Add release version to environment variables 🌍
run: |
node -e "console.log('RELEASE_VERSION=' + require('./package.json').version)" >> $GITHUB_ENV
- name: Check if tag already exists 🏷
id: checkTag
uses: mukunku/[email protected]
with:
tag: ${{ env.RELEASE_VERSION }}
- name: Install npm dependencies 🔗
if: steps.checkTag.outputs.exists == 'false'
run: |
rm package-lock.json
npm cache clear -f
npm install
- name: Create config.json 📃
if: steps.checkTag.outputs.exists == 'false'
env:
CONFIG_JSON: ${{ secrets.CONFIG_JSON }}
run: echo $CONFIG_JSON | base64 --decode > config.json
- name: Build 🧱
if: steps.checkTag.outputs.exists == 'false'
run: |
npm run lint
npm run build
- name: Create data_w.zip for release 🗄
if: steps.checkTag.outputs.exists == 'false'
run: |
cd release
zip -r ../data_w.zip *
cd ..
- name: Deploy to GitHub-Pages 🛳
uses: JamesIves/[email protected]
if: steps.checkTag.outputs.exists == 'false'
with:
branch: gh-pages
folder: dist
- name: Create Release 🎉 🥳
uses: softprops/[email protected]
if: steps.checkTag.outputs.exists == 'false'
with:
tag_name: ${{ env.RELEASE_VERSION }}
name: Version ${{ env.RELEASE_VERSION }}
files: data_w.zip