Skip to content

🚀 Deploy to GitHub Pages for 🌱 geocat-gpf #13

🚀 Deploy to GitHub Pages for 🌱 geocat-gpf

🚀 Deploy to GitHub Pages for 🌱 geocat-gpf #13

Workflow file for this run

name: Deploy
run-name: 🚀 Deploy to GitHub Pages for ${{ github.event_name == 'issue_comment' && 'PR' || '🌱' }} ${{github.event_name == 'issue_comment' && github.event.issue.number || github.ref_name}}
env:
NODE_VERSION: 18.16.1
# This workflow deploys the geoadmin demo app
on:
push:
branches:
- geocat-gpf
jobs:
gh-pages:
name: Deploy geoadmin demo
runs-on: ubuntu-latest
env:
BRANCH_NAME: ${{'geocat-gpf'}}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Install
run: npm ci
- name: Build geoadmin-demo app
run: npx nx build geoadmin-demo --prod --base-href=./
- name: Deploy to directory ${{ env.BRANCH_NAME }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
npx gh-pages --dist dist/ --dest ${{env.BRANCH_NAME}} --remove "${{env.BRANCH_NAME}}/**" --no-history --repo "https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git"