Skip to content

chore: add checkout node and build steps #3

chore: add checkout node and build steps

chore: add checkout node and build steps #3

name: 'copy build to d2-ci'
on:
push:
branches:
env:
GIT_AUTHOR_NAME: '@dhis2-bot'
GIT_AUTHOR_EMAIL: '[email protected]'
GIT_COMMITTER_NAME: '@dhis2-bot'
GIT_COMMITTER_EMAIL: '[email protected]'
GH_TOKEN: ${{secrets.DHIS2_BOT_GITHUB_TOKEN}}
CI: true
jobs:
build:
if: ${{ !github.event.push.repository.fork }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install
run: yarn install --frozen-lockfile
- name: Build
run: yarn d2-app-scripts build
- uses: actions/upload-artifact@v3
with:
name: app-build
path: |
**/build
!**/node_modules
retention-days: 1
copy-to-d2-ci:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install
run: yarn install --frozen-lockfile
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: app-build
- name: Copy build to d2-ci
uses: dhis2/deploy-build@master
with:
build-dir: build/app
github-token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}