Skip to content

Enabling MetaMask security code scanner (#112) #25

Enabling MetaMask security code scanner (#112)

Enabling MetaMask security code scanner (#112) #25

name: Publish to GitHub Pages
on:
push:
branches: [main]
jobs:
publish-gh-pages:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Node.js version
id: nvm
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
- uses: actions/setup-node@v2
with:
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
- name: Get Yarn cache directory
run: echo "::set-output name=YARN_CACHE_DIR::$(yarn cache dir)"
id: yarn-cache-dir
- name: Get Yarn version
run: echo "::set-output name=YARN_VERSION::$(yarn --version)"
id: yarn-version
- name: Cache yarn dependencies
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir.outputs.YARN_CACHE_DIR }}
key: yarn-cache-${{ runner.os }}-${{ steps.yarn-version.outputs.YARN_VERSION }}-${{ hashFiles('yarn.lock') }}
- run: yarn --frozen-lockfile
- run: yarn allow-scripts
- uses: MetaMask/action-publish-gh-pages@v1
with:
npm-build-command: demo:all
directory: demo/dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}