Merge pull request #975 from SwedbankPay/feature/SWED-2336-radio_butt… #2437
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: Main | |
on: | |
push: | |
branches: | |
- "feature/**" | |
- "develop" | |
- "release/**" | |
jobs: | |
build: | |
name: Build and deploy | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
brand: ["payex", "swedbankpay"] | |
steps: | |
- uses: actions/checkout@v4 | |
# Set brand specific variables | |
- name: Environment variables | |
id: variables | |
run: ./.github/scripts/variables.sh --brand ${{ matrix.brand }} --ref ${{ github.ref }} | |
- name: Set Node.js 18.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ runner.os }}-node- | |
- name: Install | |
run: npm ci | |
- name: Build | |
run: npm run ${{ steps.variables.outputs.BUILD_SCRIPT }} -- --env basename=${{ steps.variables.outputs.BRANCH }} --env semver=${{ steps.variables.outputs.BRANCH }} --env info_version=${{ steps.variables.outputs.VERSION }} --env github_actions=true | |
- name: Create latest version reference file | |
run: | | |
echo "{ \"latestVersion\" : \"${{ steps.variables.outputs.BRANCH }}\" }" > ./dist/latestVersion.json | |
- name: Azure Login | |
uses: azure/[email protected] | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS_STAGE }} | |
- name: Azure Deploy | |
uses: azure/CLI@v2 | |
with: | |
azcliversion: 2.43.0 | |
inlineScript: | | |
az storage blob upload-batch -s dist -d \$web --account-name ${{ steps.variables.outputs.AZURE_ACCOUNT_STAGE }} --overwrite |