Build documentation #14
Workflow file for this run
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 documentation | |
on: | |
release: | |
types: [published] | |
jobs: | |
docs: | |
name: Generate SassDoc Documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install & Build 🔧 | |
run: npm i && npm run build | |
- name: Install SassDoc | |
run: npm install -g sassdoc | |
- name: Install Sass Convert globally | |
run: | | |
npm install -g sass-convert | |
echo "::add-path::$(npm bin -g)" | |
- name: Generate SassDoc documentation | |
run: npx sassdoc dist/sass --dest docs/ | |
- name: Deploy documentation to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs | |
publish_branch: doc | |
user_name: 'github-actions[bot]' | |
user_email: 'github-actions[bot]@users.noreply.github.com' |