Merge pull request #184 from data-to-insight/update/default-year-2025 #146
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
name: Build and Deploy | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
build-and-deploy: | |
name: 'Build and Deploy' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
cache: 'yarn' | |
- name: Install and Build 🔧 | |
env: | |
REACT_APP_SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
REACT_APP_GA_MEASUREMENT_ID: ${{ secrets.GA_MEASUREMENT_ID }} | |
PUBLIC_URL: ${{ secrets.PUBLIC_URL }} | |
run: | | |
yarn install --frozen-lockfile | |
yarn build | |
node scripts/productionise-html.js --wheelPath /bin/dist/csc_validator_be_cin-0.1.3-py3-none-any.whl --tool ToolCIN | |
- name: Deploy 🚀 | |
if: github.ref == 'refs/heads/main' | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: build # The folder the action should deploy. | |
- name: Modify for 903 | |
run: node scripts/productionise-html.js --wheelPath /bin/dist/csc_validator_be_903-0.1.5-py3-none-any.whl --tool Tool903 | |
- name: Pushes files to 903/LAC repo | |
if: github.ref == 'refs/heads/main' | |
uses: dmnemec/copy_file_to_another_repo_action@main | |
env: | |
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} | |
with: | |
source_file: 'build/.' | |
destination_repo: 'data-to-insight/csc-validator-fe-publish-903' | |
destination_branch: 'gh-pages' | |
user_email: '[email protected]' | |
user_name: 'dotloadmovie' | |
commit_message: 'Release to 903' |