Skip to content

Commit

Permalink
Deploy build to gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
dnlkoch committed Apr 19, 2022
1 parent 707ee61 commit 1a763e2
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/on-push-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Update gh-pages

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources 🔰
uses: actions/checkout@v2

- name: Setup Node.js 16 🧮
uses: actions/setup-node@v1
with:
node-version: 16

- name: Cache Node.js modules 💾
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install dependencies ⏬
run: npm ci

- name: Build artifacts 🏗️
run: npm run build

- name: Get react-geo-client-template version 🔖
run: |
echo "VERSION=$(node -pe "require('./package.json').version")" >> $GITHUB_ENV
- name: Deploy (to docs/v${{ env.VERSION }}) 🚀
uses: JamesIves/github-pages-deploy-action@v4.2.5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: dist
target-folder: v${{ env.VERSION }}

- name: Deploy (to docs/latest) 🚀
uses: JamesIves/github-pages-deploy-action@v4.2.5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: dist
target-folder: latest

0 comments on commit 1a763e2

Please sign in to comment.