Build and publish TED Developer Docs #19
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: Build and publish TED Developer Docs | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
publish_site: | |
name: "Build and publish site with Antora" | |
runs-on: [ubuntu-latest] | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' | |
NODE_OPTIONS: '--max-old-space-size=8192' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js for use with actions | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Install Corepack | |
run: npm install --prefix .node corepack | |
- name: Install Yarn | |
run: .node/node_modules/.bin/corepack enable --install-directory .node | |
- name: Install packages | |
run: .node/yarn install | |
- name: Generate site | |
run: yarn run build | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
token: "${{ github.token}}" | |
folder: build/site | |
branch: 'gh-pages' | |
commit-message: "[CI] Publish Documentation for ${{ github.sha }}" |