mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-20 20:49:15 +00:00
docs: 🔥 added netlify
This commit is contained in:
36
.github/workflows/netlify.yml
vendored
36
.github/workflows/netlify.yml
vendored
@@ -1,18 +1,16 @@
|
|||||||
# .github/workflows/netlify.yml
|
name: BotWhatsapp Documentation Site
|
||||||
name: Build and Deploy to Documentation Netlify
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
- main
|
|
||||||
types: [closed]
|
|
||||||
jobs:
|
jobs:
|
||||||
############ BUILD PACKAGE ############
|
############ DOCUMENTATION BUILD ############
|
||||||
build-package:
|
build-documentation:
|
||||||
name: Build Package
|
name: Build Package
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
|
||||||
- test-unit
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -29,15 +27,29 @@ jobs:
|
|||||||
- name: Install NPM Dependencies
|
- name: Install NPM Dependencies
|
||||||
run: yarn install --immutable --network-timeout 300000
|
run: yarn install --immutable --network-timeout 300000
|
||||||
|
|
||||||
- name: Build Package
|
- name: Build Documentation
|
||||||
run: cd ./packages/docs/ && npm run build
|
run: cd packages/docs && yarn run build
|
||||||
|
|
||||||
|
- name: Temporarily save Dist
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: documentation-dist
|
||||||
|
path: packages/docs/dist
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: documentation-dist
|
||||||
|
path: packages/docs/dist
|
||||||
|
|
||||||
- name: Deploy to Netlify
|
- name: Deploy to Netlify
|
||||||
uses: nwtgck/actions-netlify@v1.2
|
uses: nwtgck/actions-netlify@v1.2
|
||||||
with:
|
with:
|
||||||
publish-dir: './packages/docs/dist'
|
publish-dir: 'packages/docs/dist'
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
deploy-message: 'Deploy from GitHub Actions'
|
deploy-message: 'Deploy from GitHub Actions'
|
||||||
enable-pull-request-comment: false
|
enable-pull-request-comment: false
|
||||||
@@ -46,4 +58,4 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||||
timeout-minutes: 1
|
timeout-minutes: 1
|
||||||
|
|||||||
Reference in New Issue
Block a user