mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-18 03:29:15 +00:00
69 lines
2.0 KiB
YAML
69 lines
2.0 KiB
YAML
name: 📄 Desplegando documentacion
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- 'feat/docs-**'
|
|
- 'fix/docs-**'
|
|
push:
|
|
branches:
|
|
- 'feat/docs-**'
|
|
- 'fix/docs-**'
|
|
|
|
jobs:
|
|
############ DOCUMENTATION BUILD ############
|
|
build-documentation:
|
|
name: Build Package
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16.x
|
|
cache: 'yarn'
|
|
registry-url: https://registry.npmjs.org/
|
|
|
|
- run: corepack enable
|
|
|
|
- name: Install NPM Dependencies
|
|
run: yarn install --immutable --network-timeout 300000
|
|
|
|
- name: Build Documentation
|
|
run: cd packages/docs && yarn run build
|
|
|
|
- name: Temporarily save Dist
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: documentation-dist
|
|
path: |
|
|
packages/docs/dist/
|
|
packages/docs/.netlify/
|
|
packages/docs/netlify.toml
|
|
############ DEPLOY ############
|
|
deploy:
|
|
runs-on: ubuntu-18.04
|
|
needs:
|
|
- build-documentation
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/download-artifact@v3
|
|
with:
|
|
name: documentation-dist
|
|
path: |
|
|
packages/docs/dist/
|
|
packages/docs/.netlify/
|
|
packages/docs/netlify.toml
|
|
|
|
- name: Deploy to netlify
|
|
uses: netlify/actions/cli@master
|
|
env:
|
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
|
with:
|
|
args: deploy --context packages/docs/netlify.toml --build --site ${{ secrets.NETLIFY_SITE_ID }}
|