Merge pull request #26 from PolestarLabs/dependabot/npm_and_yarn/mong… #115
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: Version | |
on: | |
push: | |
branches: [ dev ] | |
jobs: | |
version: | |
name: ⚛️ Update Canonical Version | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
with: | |
node-version: '16.5' | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Update Package V | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Pollux Autoupdate" | |
git pull | |
npm version patch -m "Autoupgrade to %s" | |
git push | |
pull: | |
env: | |
DIR: ${{ secrets.DASH_DIR_DEV }} | |
name: 🔁 Sync with Repository | |
needs: version | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Go to directory | |
run: cd $DIR | |
- name: Git Reset | |
run: | | |
git reset --hard | |
git pull | |
npm: | |
runs-on: self-hosted | |
needs: pull | |
env: | |
DIR: ${{ secrets.DASH_DIR_DEV }} | |
name: 📦 Build (NPM) | |
steps: | |
- name: Running NPM install | |
run: | | |
cd $DIR | |
npm install | |
- name: Audit fix | |
run: npm audit fix | |
continue-on-error: true | |
- name: Update Package | |
run: | | |
git add ./package-lock.json | |
git commit -m "Auto update package-lock" | |
git push | |
continue-on-error: true | |
deploy: | |
name: 🚀 Launch | |
needs: npm | |
runs-on: self-hosted | |
env: | |
DIR: ${{ secrets.DASH_DIR_DEV }} | |
steps: | |
- name: Go go Power Rangers | |
run: | | |
pm2 restart PLR | |