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

62 lines
1.5 KiB
YAML
Raw Normal View History

name: Webchat Deploy GH Pages
on:
push:
branches:
- 'main'
jobs:
2021-04-22 22:47:23 +00:00
deploy_gh_pages:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set git author identity
run: |
2021-05-13 00:42:14 +00:00
git config user.name "GitHub Action On waku-js Repo"
git config user.email "franck+ghpages@status.im"
- name: Install NodeJS
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache npm cache
uses: actions/cache@v2
with:
path: ~/.npm
key: node-v1-${{ hashFiles('**/package-lock.json') }}
2021-05-13 00:42:14 +00:00
- name: "[waku-js] install using npm ci"
2021-04-22 22:46:07 +00:00
uses: bahmutov/npm-install@v1
2021-05-13 00:42:14 +00:00
- name: "[waku-js] build"
2021-04-22 22:46:07 +00:00
run: npm run build
- name: install using npm i
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-04-28 02:04:40 +00:00
- name: build web app
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
- name: Deploy web chat app on gh pages
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
- 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