udpated oauth docs #92
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: Deploy Docusaurus on runner agent | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "docs/**" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: [self-hosted, ztnet.network] | |
defaults: | |
run: | |
working-directory: docs | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: npm | |
- name: Install dependencies | |
run: npm install | |
- name: Install Tailwind CSS | |
run: npm install tailwindcss | |
- name: Build API docs | |
run: npx docusaurus gen-api-docs all | |
- name: Build website | |
run: npm run build | |
deploy: | |
runs-on: [self-hosted, ztnet.network] | |
defaults: | |
run: | |
working-directory: docs | |
needs: build | |
steps: | |
- name: Move Website to Temporary Directory | |
run: | | |
# Define a directory within the user's home for the build | |
BUILD_DIR=~/ztnet_docs | |
# Remove any existing build directory | |
rm -rf $BUILD_DIR | |
# Create a new build directory | |
mkdir -p $BUILD_DIR | |
# Move the new build to the directory | |
mv build $BUILD_DIR | |
- name: Restart Server | |
run: pm2 restart ecosystem.config.js |