-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (32 loc) · 1.24 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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"