js-waku/.github/workflows/deploy-gh-pages.yml

92 lines
2.5 KiB
YAML

name: Webchat Deploy GH Pages
on:
push:
branches:
- 'master'
jobs:
deploy_gh_pages:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set git author identity
run: |
git config user.name "GitHub Action On js-waku Repo"
git config user.email "franck+ghpages@status.im"
- name: Install NodeJS
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Cache npm cache
uses: actions/cache@v2
with:
path: ~/.npm
key: node-v2-${{ hashFiles('**/package-lock.json') }}
- name: "[js-waku] install using npm ci"
uses: bahmutov/npm-install@v1
- name: "[js-waku] build"
run: npm run build
- name: "[web-chat] install using npm i"
run: npm install
working-directory: examples/web-chat
- name: "[web-chat] build"
run: npm run build
working-directory: examples/web-chat
- name: "[web-chat] Deploy on gh pages to /"
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./examples/web-chat/build
- name: "[eth-pm] install using npm i"
run: npm install
working-directory: examples/eth-pm
- name: "[eth-pm] build"
run: npm run build
working-directory: examples/eth-pm
- name: "[eth-pm] Deploy on gh pages to /eth-pm"
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./examples/eth-pm/build
destination_dir: eth-pm
- name: "[eth-pm-wallet] install using npm i"
run: npm install
working-directory: examples/eth-pm-wallet-encryption
- name: "[eth-pm-wallet] build"
run: npm run build
working-directory: examples/eth-pm-wallet-encryption
- name: "[eth-pm-wallet] Deploy on gh pages to /eth-pm-wallet"
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./examples/eth-pm-wallet-encryption/build
destination_dir: eth-pm-wallet
- name: Generate docs
run: npm run doc:html
- name: Deploy documentation on gh pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
keep_files: true # Do not delete web chat app
publish_dir: ./build/docs
destination_dir: docs