diff --git a/.github/workflows/node.js.yml b/.github/workflows/lint.yml similarity index 100% rename from .github/workflows/node.js.yml rename to .github/workflows/lint.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..c949ebe --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,54 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Deploy to GitHub pages + +on: + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + +# Grant GITHUB_TOKEN the permissions required to make a Pages deployment + +jobs: + + pre-publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Setup Node 22.x + uses: actions/setup-node@v4 + with: + node-version: 22.x + cache: 'npm' + # install packages and build + - run: npm ci + - run: IS_WEB=1 npm run build:ui + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # upload build materials + path: 'dist/ui' + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: pre-publish + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source +