2021-04-22 11:40:19 +00:00
|
|
|
name: Webchat Deploy GH Pages
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2022-01-03 23:13:38 +00:00
|
|
|
- 'master'
|
2021-04-22 11:40:19 +00:00
|
|
|
|
|
|
|
jobs:
|
2021-04-22 22:47:23 +00:00
|
|
|
deploy_gh_pages:
|
2021-04-22 11:40:19 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2021-04-23 05:52:02 +00:00
|
|
|
- name: Set git author identity
|
|
|
|
run: |
|
2021-05-13 06:49:29 +00:00
|
|
|
git config user.name "GitHub Action On js-waku Repo"
|
2021-04-23 05:52:02 +00:00
|
|
|
git config user.email "franck+ghpages@status.im"
|
|
|
|
|
2021-04-22 11:40:19 +00:00
|
|
|
- name: Install NodeJS
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: '14'
|
|
|
|
|
|
|
|
- name: Cache npm cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.npm
|
2022-01-06 02:13:14 +00:00
|
|
|
key: node-v2-${{ hashFiles('**/package-lock.json') }}
|
2021-04-22 11:40:19 +00:00
|
|
|
|
2021-05-13 06:49:29 +00:00
|
|
|
- name: "[js-waku] install using npm ci"
|
2021-04-22 22:46:07 +00:00
|
|
|
uses: bahmutov/npm-install@v1
|
|
|
|
|
2021-05-13 06:49:29 +00:00
|
|
|
- name: "[js-waku] build"
|
2021-04-22 22:46:07 +00:00
|
|
|
run: npm run build
|
|
|
|
|
2021-06-18 06:51:11 +00:00
|
|
|
- name: "[web-chat] install using npm i"
|
2021-04-22 22:46:07 +00:00
|
|
|
run: npm install
|
2021-05-05 04:57:46 +00:00
|
|
|
working-directory: examples/web-chat
|
2021-04-22 22:46:07 +00:00
|
|
|
|
2021-06-18 06:51:11 +00:00
|
|
|
- name: "[web-chat] build"
|
2021-04-28 02:04:40 +00:00
|
|
|
run: npm run build
|
2021-05-05 04:57:46 +00:00
|
|
|
working-directory: examples/web-chat
|
2021-04-28 02:04:40 +00:00
|
|
|
|
2021-06-18 06:51:11 +00:00
|
|
|
- name: "[web-chat] Deploy on gh pages to /"
|
2021-04-28 02:03:39 +00:00
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
2021-05-05 04:57:46 +00:00
|
|
|
publish_dir: ./examples/web-chat/build
|
2021-05-10 06:52:53 +00:00
|
|
|
|
2021-08-17 06:01:27 +00:00
|
|
|
- name: "[eth-pm] install using npm i"
|
2021-06-18 06:51:11 +00:00
|
|
|
run: npm install
|
2021-08-17 06:01:27 +00:00
|
|
|
working-directory: examples/eth-pm
|
2021-06-18 06:51:11 +00:00
|
|
|
|
2021-08-17 06:01:27 +00:00
|
|
|
- name: "[eth-pm] build"
|
2021-06-18 06:51:11 +00:00
|
|
|
run: npm run build
|
2021-08-17 06:01:27 +00:00
|
|
|
working-directory: examples/eth-pm
|
2021-06-18 06:51:11 +00:00
|
|
|
|
2021-08-17 06:01:27 +00:00
|
|
|
- name: "[eth-pm] Deploy on gh pages to /eth-pm"
|
2021-06-18 06:51:11 +00:00
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
2021-08-17 06:01:27 +00:00
|
|
|
publish_dir: ./examples/eth-pm/build
|
|
|
|
destination_dir: eth-pm
|
2021-06-18 06:51:11 +00:00
|
|
|
|
2021-08-12 06:03:50 +00:00
|
|
|
- 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
|
|
|
|
|
2021-05-10 06:52:53 +00:00
|
|
|
- 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
|