workspaces_registry_template/.github/workflows/build-and-deploy.yml

42 lines
1.0 KiB
YAML
Raw Normal View History

2023-01-11 11:55:36 +00:00
name: Build
2022-12-14 15:03:50 +00:00
on:
push:
2023-01-11 11:55:36 +00:00
branches-ignore:
- 'gh-pages'
2022-12-14 15:03:50 +00:00
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build # Have to run processing first so the list.json exists to be included in the the deploy
2023-01-10 13:19:21 +00:00
run: |
npm ci --prefix processing
2023-01-10 13:19:21 +00:00
node processing
2022-12-14 15:03:50 +00:00
npm ci --prefix site
npm run deploy --prefix site
2023-01-10 13:19:21 +00:00
- name: Generate App List # Have to run it again because the deploy wipes the file and folders out
2022-12-14 15:03:50 +00:00
run: |
npm ci --prefix processing
node processing
- name: Move to branch
if: github.ref != 'refs/heads/develop'
run: |
2023-01-11 14:37:03 +00:00
mv public ${{ github.head_ref || github.ref_name }}
mkdir public
mv ${{ github.head_ref || github.ref_name }} public
2022-12-14 15:03:50 +00:00
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
2023-01-10 16:54:01 +00:00
folder: public
2023-01-10 18:32:44 +00:00
force: false
2023-01-10 18:53:12 +00:00
clean: false