update author name #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Site Deployment | |
on: | |
push: | |
branches: [main] | |
paths: ['site/**', '.github/workflows/site-deployment.yml'] | |
repository_dispatch: | |
types: [newdocs] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Check out repo | |
uses: actions/checkout@v3 | |
# Node is required for npm | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 'lts/*' | |
# Install and build Docusaurus website | |
- name: Build Docusaurus website | |
run: | | |
yarn | |
cd site | |
yarn | |
yarn build | |
- name: Deploy to GitHub Pages | |
if: success() | |
uses: crazy-max/ghaction-github-pages@v2 | |
with: | |
target_branch: gh-pages | |
build_dir: site/build | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
notify: | |
name: Discord Notification | |
runs-on: ubuntu-latest | |
needs: # make sure the notification is sent AFTER the jobs you want included have completed | |
- deploy | |
if: ${{ always() }} # You always want to be notified: success, failure, or cancelled | |
steps: | |
- name: Notify | |
uses: nobrayner/discord-webhook@v1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
discord-webhook: ${{ secrets.DISCORD_WEBHOOK }} |