matusbulla is trying actions to make docusaurus #27
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: Build and Deploy Docusaurus | |
| run-name: ${{ github.actor }} is trying actions to make docusaurus | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build-job: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Initialize Node.JS for this job | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "20.2" # zafixovat verziu | |
| - name: Run NodeJS build | |
| run: npm run build | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| name: github-pages | |
| path: build/ | |
| test-of-html: | |
| runs-on: ubuntu-24.04 | |
| needs: build-job | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Download build/ artifacts | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: github-pages | |
| path: build/ | |
| - name: Initialize Node.JS for this job | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "20.x" # ak to pouzivas na viacerych miestach, tak to tahat z jedneho miesta | |
| - name: Run HTML tests | |
| run: | | |
| npm install htmlhint -g | |
| htmlhint --version | |
| npx htmlhint build/ | |
| deploy-page: | |
| needs: test-of-html | |
| permissions: | |
| pages: write | |
| id-token: write | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Deplot to GitHub Pages | |
| uses: actions/deploy-pages@v4 | |