Merge from develop branch (#174) #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Continuous Integration Workflow | |
name: Build Out Exports | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [staging] | |
paths: "src/app/**" | |
# Target Branch Job | |
jobs: | |
Build-Export: | |
# Execute on Ubuntu-Latest Distro | |
runs-on: ubuntu-latest | |
steps: | |
# Check Out Repository | |
- uses: actions/checkout@v1 | |
# Install Node.js | |
- uses: actions/[email protected] | |
with: | |
node-version: 16 | |
registry-url: https://npm.pkg.github.com/ | |
scope: "@datature" | |
# Install your dependencies | |
- name: Installing | |
working-directory: ./src/app | |
run: npm install --legacy-peer-deps | |
- name: Remove existing out folder | |
shell: bash | |
run: | | |
if [ -d portal_build/out ]; then | |
echo "Directory exists, removing it" | |
rm -r portal_build/out | |
fi | |
# Build NextJS Project | |
- name: Building Nexus / NextJS | |
working-directory: ./src/app | |
run: npm run build:static | |
- name: Pushing Static Files to Portal Build | |
shell: bash | |
run: | | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add -f ./portal_build/out | |
git commit -m "Re-Exported Portal to Portal Build" -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |