Skip to content

Instantly share code, notes, and snippets.

@robinmanuelthiel
Created September 14, 2021 15:30
Show Gist options
  • Save robinmanuelthiel/1f04c9b0c186d08bfc5d3869b997d4c6 to your computer and use it in GitHub Desktop.
Save robinmanuelthiel/1f04c9b0c186d08bfc5d3869b997d4c6 to your computer and use it in GitHub Desktop.
GitHub Action to update and publish Docusaurus Docs to GitHub Pages
name: Update documentaion
on:
workflow_dispatch:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '12.x'
- run: yarn install
- run: yarn build
- run: |
git config --global user.name $GITHUB_ACTOR
git config --global user.email [email protected]
yarn deploy --skip-build
env:
GIT_USER: $GITHUB_ACTOR
GIT_PASS: ${{ secrets.GITHUB_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment