Skip to content

Merge pull request #264 from PoliNetworkOrg/dependabot/npm_and_yarn/n… #276

Merge pull request #264 from PoliNetworkOrg/dependabot/npm_and_yarn/n…

Merge pull request #264 from PoliNetworkOrg/dependabot/npm_and_yarn/n… #276

Workflow file for this run

name: CD
on:
workflow_dispatch:
push:
branches:
- master
- main
jobs:
cd:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [16]
steps:
- name: 🛎 Checkout
uses: actions/checkout@master
- name: 🏗 Setup node env
uses: actions/[email protected]
with:
node-version: ${{ matrix.node }}
check-latest: true
- name: 📦 Cache node_modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: 👨🏻‍💻 Install dependencies (1)
run: npm cache verify
- name: 👨🏻‍💻 Install dependencies (2)
run: npm install
- name: commit
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github action"
git add .
(git commit -m 'push files') || true
git pull
(git push) || true
- name: 👨‍🏭️ Generate
run: npm run generate
- name: 🚀 Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist