Merge pull request #4223 from JoinColony/fix-dapp-cicd #513
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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Build styleguide and deploy | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build-and-deploy: | |
strategy: | |
matrix: | |
node-version: [14.18.0] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly. | |
with: | |
persist-credentials: false | |
- name: Install SSH Client 🔑 | |
uses: webfactory/ssh-agent@v0.4.1 | |
with: | |
ssh-private-key: ${{ secrets.DEPLOY_KEY }} | |
- name: npm | |
run: npm i -g npm@8.1.4 --registry=https://registry.npmjs.org | |
- name: Install and Build 🔧 | |
run: | | |
npm install | |
npm run styleguide:build | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
with: | |
SSH: true | |
BRANCH: gh-pages # The branch the action should deploy to. | |
FOLDER: styleguide # The folder the action should deploy. |