chore: workflow to upload theme directory artifact #7
Workflow file for this run
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 | |
on: | |
push: | |
branches: [main] | |
pull_request: # remove before merging | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install npm dependencies | |
run: npm ci | |
- name: Install PHP dependencies with Composer | |
uses: php-actions/composer@v6 | |
with: | |
php_version: '8.1' | |
version: 2.x | |
- name: Run tests | |
run: npm test | |
- name: Build theme | |
run: npm run build:prod | |
# - name: Set up Docker Buildx | |
# uses: docker/setup-buildx-action@v3 | |
# - name: Build and export | |
# uses: docker/build-push-action@v5 | |
# with: | |
# context: . | |
# tags: myimage:latest | |
# outputs: type=docker, dest=/tmp/myimage.tar | |
- name: 'Login to GitHub Container Registry' | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{github.actor}} | |
password: ${{secrets.GH_TOKEN}} | |
- name: 'Build Inventory Image' | |
run: | | |
docker build . --tag ghcr.io/sparkbox/store:latest | |
docker push ghcr.io/sparkbox/store:latest | |
# - name: Upload artifact | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: myimage | |
# path: /tmp/myimage.tar |