Skip to content

Workflow file for this run

name: Build module artifact & deploy
on: [push, pull_request]
env:
NODE_VERSION: 20
jobs:
build:
name: Build dependencies & create artifact
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
cache-dependency-path: '_dev/package-lock.json'
- name: Install & build
working-directory: _dev
run: |
npm install
npm run build
- name: Install dev composer dependencies
run: composer install
- name: Generate index.php
run: vendor/bin/autoindex
- name: Install prod composer dependencies
run: composer install --no-dev
- name: Clean-up project
uses: PrestaShopCorp/[email protected]
- name: Create & upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}
path: '.'
include-hidden-files: true
debug:
name: Debug
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ${{ github.event.repository.name }}
path: ./${{ github.event.repository.name }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0
with:
project_id: ${{ secrets.G_PROJECT_INTEGRATION }}
service_account_key: ${{ secrets.G_CREDENTIAL_INTEGRATION }}
export_default_credentials: true
- name: Copy env files
run: |
pwd
ls -la
gcloud components install beta
gcloud beta secrets versions access latest --secret="${{env.GLOUD_SECRET_NAME}}" >> ./${{ github.event.repository.name }}/.env
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.G_CREDENTIAL_INTEGRATION }}