From 028d61c44b6aa8aae39aefa5aeab056df378d4c1 Mon Sep 17 00:00:00 2001 From: rainu Date: Tue, 29 Oct 2024 17:23:39 +0100 Subject: [PATCH] add github workflow for building github pages --- .github/workflows/gh-pages.yml | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/gh-pages.yml diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..8d9c163 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,49 @@ +name: Deploy Application to Github-Pages + +on: + push: + tags: + - v* + + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: "20" + - name: Build and generate application + env: + GIT_REF_NAME: ${{ github.ref_name}} + run: | + npm install + npm run build + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./dist + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file