diff --git a/.github/workflows/azure-staticwebapp.yml b/.github/workflows/azure-staticwebapp.yml index c340ab3..614f006 100644 --- a/.github/workflows/azure-staticwebapp.yml +++ b/.github/workflows/azure-staticwebapp.yml @@ -14,10 +14,10 @@ name: Deploy EOEFANS WEB to Azure Static Web Apps on: push: - branches: [ "main" ] - pull_request: - types: [synchronize, closed] - branches: [ "main" ] + branches: [ "release" ] +# pull_request: +# types: [synchronize, closed] +# branches: [ "release" ] # Environment variables available to all jobs and steps in this workflow env: diff --git a/.github/workflows/github-page-deploy.yml b/.github/workflows/github-page-deploy.yml new file mode 100644 index 0000000..a855008 --- /dev/null +++ b/.github/workflows/github-page-deploy.yml @@ -0,0 +1,82 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy dev-branch content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # 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 +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + strategy: + matrix: + node-version: [16.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + runs-on: [ self-hosted ] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + name: Use Node.js ${{ matrix.node-version }} + with: + node-version: ${{ matrix.node-version }} + + - uses: pnpm/action-setup@v2 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Use pnpm to build + run: pnpm run build + +# - name: post-build test +# run: pnpm test + + - name: Setup Pages + uses: actions/configure-pages@v2 + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: dist + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1