Skip to content

Commit

Permalink
add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
9R committed Sep 12, 2024
1 parent dffaef9 commit 84321cb
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/upload-zip-to-web-generator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: zip and upload model to generator

on:
push:
branches:
- main

workflow_dispatch:

jobs:
package_and_upload:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: rename scad model
run: mv ScadBox.scad model.scad

- name: Create archive
run: zip model.zip model.scad

- name: Checkout repo_b
uses: actions/checkout@v3
with:
repository: 9R/StorageBox-Generator
token: ${{ secrets.STORAGEBOXGENERATORPUSH }}
ref: production
path: StorageBox-Generator

- name: Copy model.zip to StorageBox-Generator Repo
run: cp model.zip StorageBox-Generator

- name: Commit and push model.zip to StorageBox-Generator Repo
run: |
cd StorageBox-Generator
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add model.zip
git commit -m "Add latest version from https://github.com/9R/Customizable-OpenSCAD-Storage-Box"
git push

0 comments on commit 84321cb

Please sign in to comment.