diff --git a/.github/workflows/publish-github-pages.yml b/.github/workflows/publish-github-pages.yml index 0b7f99a..d9a3a1b 100644 --- a/.github/workflows/publish-github-pages.yml +++ b/.github/workflows/publish-github-pages.yml @@ -13,10 +13,15 @@ # # ----------------------------------------------------------------------------- -# Simple workflow for deploying static content to GitHub Pages +# https://xpack.github.io/xpm/ +# https://github.com/xpack/xpm-js/actions/workflows/publish-github-pages.yml + +# Workflow for deploying static content to GitHub Pages. name: GitHub Pages +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows + on: # Runs on pushes, if all conditions are met: push: @@ -36,27 +41,29 @@ on: - '.github/workflows/publish-github-pages.yml' - 'package.json' - # Allows you to run this workflow manually from the Actions tab + # Allows you to run this workflow manually from the Actions tab. workflow_dispatch: -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages. permissions: contents: read pages: write id-token: write -# Allow one concurrent deployment +# Allow one concurrent deployment. +# https://docs.github.com/en/actions/using-jobs/using-concurrency concurrency: group: "pages" cancel-in-progress: true jobs: - # Single deploy job since we're just deploying + # Single deploy job since we're just deploying. # https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories deploy: environment: name: github-pages url: ${{steps.deployment.outputs.page_url}} + # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources runs-on: ubuntu-24.04 steps: @@ -71,21 +78,22 @@ jobs: # https://github.com/actions/setup-node uses: actions/setup-node@v4 with: + # Node LTS version. node-version: 20 - name: Install dependencies - run: npm ci -C website + run: (cd website; npm ci) - name: Build the Docusaurus site env: DOCUSAURUS_IS_PREVIEW: 'true' - run: npm run build -C website + run: (cd website; npm run build) - name: Setup Pages # https://github.com/actions/configure-pages uses: actions/configure-pages@v5 - - name: Upload artifact + - name: Upload Pages artifact # https://github.com/actions/upload-pages-artifact uses: actions/upload-pages-artifact@v3 with: @@ -93,6 +101,8 @@ jobs: path: './website/build' - name: Deploy to GitHub Pages - id: deployment + id: deployment # referred by environment above, to get the URL. # https://github.com/actions/deploy-pages uses: actions/deploy-pages@v4 + with: + artifact_name: github-pages diff --git a/.gitignore b/.gitignore index 94c77a3..e1b95cf 100644 --- a/.gitignore +++ b/.gitignore @@ -154,7 +154,10 @@ build*/ Thumbs.db .DS_Store +tests/top + website/.docusaurus website/build +website/html # ----- end ----- diff --git a/package.json b/package.json index 65645c8..7689fc3 100644 --- a/package.json +++ b/package.json @@ -152,8 +152,8 @@ ] }, "topConfig": { - "longName": "xPack Project Manager", - "shortName": "xpm", + "descriptiveName": "xPack Project Manager", + "permalinkName": "xpm", "hasTriggerPublish": "true", "isWebPreview": "true" },