diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 000000000..0a0b4eaab --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,61 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: true + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: yarn + + - name: Enable Corepack + run: corepack enable + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Build + run: yarn gulp release --baseHref "/${{ github.event.repository.name }}/" + env: + NODE_OPTIONS: "--max_old_space_size=4096" + + - name: Disable Jekyll + run: touch wwwroot/.nojekyll + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: wwwroot + + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/package.json b/package.json index 3b62f595b..13dee3ee3 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "version": "0.4.4", "description": "Geospatial catalog explorer based on TerriaJS.", "license": "Apache-2.0", + "packageManager": "yarn@1.22.22", "engines": { "node": ">= 20.0.0" },