matusbulla is trying actions to make docusaurus #21
This file contains hidden or 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: docusaurus cicd | |
| run-name: ${{ github.actor }} is trying actions to make docusaurus | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build-job: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Initialize Node.JS for this job | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20.x' | |
| - run: npm version | |
| - run: npm run build | |
| - name: Archive build/ artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-folder-artifacts-docusaurus | |
| path: build/ | |
| test-of-html: | |
| runs-on: ubuntu-24.04 | |
| needs: build-job | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Download build/ artifacts | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: build-folder-artifacts-docusaurus | |
| path: build/ | |
| - name: Initialize Node.JS for this job | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20.x' | |
| - run: | | |
| npm install htmlhint -g | |
| htmlhint --version | |
| npx htmlhint build/ | |
| deploy-page: | |
| runs-on: ubuntu-24.04 | |
| needs: test-of-html | |
| steps: | |
| - name: Download build/ artifacts | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: build-folder-artifacts-docusaurus | |
| path: build/ | |
| - name: Deplot to GitHub Pages | |
| uses: actions/deploy-pages@v4 | |
| with: | |
| folder: build/ | |